iOS禁止UIWebView 复制粘贴
2018-04-24 本文已影响322人
陪妮走未来
- (void)webViewDidFinishLoad:(UIWebView *)webView {
// 禁止用户复制粘贴
[self.webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webkitUserSelect=’none’;”];
// 禁止用户拨打电话
[self.webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webkitTouchCallout=’none’;”];
}