Created
January 14, 2013 14:42
-
-
Save cgack/4530512 to your computer and use it in GitHub Desktop.
fragment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { | |
NSURL *url = [request URL]; | |
if ( ([url fragment] != NULL) && ([[url fragment] rangeOfString:@"openExternal=true"].location != NSNotFound) ) | |
{ | |
if ([[UIApplication sharedApplication] canOpenURL:url]) { | |
[[UIApplication sharedApplication] openURL:url]; | |
return NO; | |
} | |
} | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment