Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable long touch in UIWebView?

Tags:

I want to disable long-touch from the application. I have no control on the HTML that I am loading on my WebView.

like image 521
Alex Terente Avatar asked Nov 30 '10 13:11

Alex Terente


1 Answers

In webViewDidFinishLoad delegate I run a javascript on the loaded html page that disable the long touch.

[webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitTouchCallout='none'; document.body.style.KhtmlUserSelect='none'"]; 
like image 124
Alex Terente Avatar answered Mar 04 '23 08:03

Alex Terente