UIWebView禁止点击后跳转

#pragma mark 禁止webview中的链接点击

- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {

    if (navigationType == UIWebViewNavigationTypeLinkClicked) {
        return NO;
    } else {
        return YES;
    }

}

  

posted @ 2016-03-10 20:20  Rinpe  阅读(525)  评论(0编辑  收藏  举报