How to disable long touch in UIWebView?

后端 未结 4 479
南旧
南旧 2020-12-14 01:36

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

4条回答
  •  -上瘾入骨i
    2020-12-14 02:16

    The UIWebView is no longer supported. So, you should implement WKWebView and there is a property called allowsLinkPreview with that you can enable or disable the long touch previews.

     webView.allowsLinkPreview = false
    

提交回复
热议问题