Remove callOut and userSelect from UIWebView


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #pragma mark -
  2. #pragma mark UIWebViewDelegate
  3.  
  4. - (void)webViewDidFinishLoad:(UIWebView *)webView {
  5. // Disable user selection
  6. [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
  7. // Disable callout
  8. [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];
  9. }

URL: http://www.undolog.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.