iOS禁止UIWebView 复制粘贴

时间:2022-11-06 23:37:51
    • (void)webViewDidFinishLoad:(UIWebView *)webView { 
      // 禁止用户复制粘贴 
      [self.webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webkitUserSelect=’none’;”]; 
      // 禁止用户拨打电话 
      [self.webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.style.webkitTouchCallout=’none’;”]; 
      }