问题描述:

When you use the Facebook App and go to the Terms and Conditions view, there is a WebView. When you choose an option in the WebView you'll go to a new view.

Now I wanna make a login system with PHP. When the user login is succeded he'll go to an webpage. How can I set for example: When the UIWebView is on www.myserver.com/ok that the new view in my app will show?

网友答案:

Set your UIWebView with delegate and check :-

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
   NSLog(@"Loading: %@", [request URL]); //if url matches www.myserver.com/ok open your view
   return YES;
}

Hope it helps you..

相关阅读:
Top