Iphone sdk: How to get rid of the action sheet in UIWebView?

I have a UIWebView, and when I click on a text link (at least for a second), a UIActionSheet panel with three buttons appears (open, copied and canceled). Is there any way to prevent its occurrence?

thank

+3
source share
3 answers

You can achieve this with CSS:

* {
   -webkit-touch-callout:none;
}
+6
source

Apparently not. In the documentation, neither UIWebView nor UIWebViewDelegate disclose any method or property to avoid this behavior.

0
source
 - (void)webViewDidFinishLoad:(UIWebView *)webView
  {
     [webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitTouchCallout='none'; document.body.style.KhtmlUserSelect='none'"];
  }
0

Source: https://habr.com/ru/post/1727779/


All Articles