Use the Delegate to Determine the Navigation Type!
My Snippet
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
if (navigationType == UIWebViewNavigationTypeLinkClicked){
NSURL *url = request.URL;
[self openExternalURL:url];//Handle External URL here
}
return YES;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…