开发者

How do I prevent breakout of a UIWebView

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜