I want to open an url in safari, outisde the app and not in webview.
I implemented the UIWebViewDelegate but I am still not able to open the url. Basically I am not
After reading the comments I think this is what you're looking for:
Implement this method:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
from UIWebViewDelegate
and depending on that request argument you should return TRUE
or FALSE
. If you don't want the web view to open it, you should call:
[[UIApplication sharedApplication] openURL:request.URL];
as others mentioned and return FALSE
.
Hope this helps. Cheers!
EDIT: If the links are not recognized in your web view, try this:
[webView setDataDetectorTypes:UIDataDetectorTypeLink]