iOS禁用webView长按弹出menu

在webView加载完成的代理方法webViewDidFinishLoad里面添加

[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];

[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];

你可能感兴趣的:(iOS禁用webView长按弹出menu)