//接收web事件
-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
if ([request.mainDocumentURL.relativePath isEqualToString:@"点击事件名"]) {
return false; //执行本地代码,返回false不让网页读取网络资源
}
return true; //为yes加载内容,否则不
}
转载于:https://www.cnblogs.com/piaojin/p/6207471.html
相关资源:垃圾分类数据集及代码