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
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
if (![[NSString stringWithFormat:@"%@",[request URL]] containsString:@"file"] ) {
[[UIApplication sharedApplication] openURL:[request URL]];
return NO;
}
return YES;
}
I used an html file in local. In this html there is some links.
If you set delegate UIWebViewDelegate and use this local html will open in your webView and the other links will open in safari
I wrote "file" because this link is "file:///Users/~/x.app/about.html" in local.