Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest: (NSURLRequest *)request navigationType: (UIWebViewNavigationType)navigationType {
- if (navigationType == UIWebViewNavigationTypeLinkClicked) {
- NSURL *url = [request URL];
- NSString *string = [url query];
- if ([string rangeOfString: @"openInSafari=true"].location != NSNotFound){
- [[UIApplication sharedApplication] openURL: url];
- NSLog(@"Open in Safari");
- return NO;
- }
- }
- NSLog(@"Open in WebView");
- return YES;
- }
Add Comment
Please, Sign In to add comment