- (void)webViewDidFinishLoad:(UIWebView *)webView{
[webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webkitUserSelect=’none’;”];
// Disable callout
[webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webkitTouchCallout=’none’;”];
}
本文介绍如何通过JavaScript禁用iOS UIWebView中的文本选择与调用功能,提供了具体的代码实现。
5234

被折叠的 条评论
为什么被折叠?



