I have an app which is native iphone code but the client would like me to use a UIWebView to integrate the ecommerce components of their website.
This isnt a p开发者_如何学Croblem, however I am yet to work out how I can prevent the app being closed and the user being redirected to Safari when any links are pressed within the UIWebView
Thanks
Implement:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
and check for UIWebViewNavigationTypeLinkClicked
. You should probably also check various other possible values of navigationType
.
精彩评论