Posted By

gfazioli on 03/10/11


Tagged

UIWebView UIWebViewDelegate callOut userSelect


Versions (?)

Remove callOut and userSelect from UIWebView


 / Published in: Objective C
 

URL: http://www.undolog.com

  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. }

Report this snippet  

You need to login to post a comment.