我们如何在ios 9-Swift中的uiwebview中禁用放大镜

Has*_*leb 4 css xcode swift ios9

我们如何在ios 9中的uiwebview中禁用放大镜

我使用下面的代码禁用uiwebview中的选择/复制..:

* {
    -webkit-touch-callout: none;
     -webkit-user-select: none; /* Disable selection/copy in UIWebView */
}
Run Code Online (Sandbox Code Playgroud)

它的工作原理,但问题是ios 9中的新放大镜,所以有没有解决方案来禁用它?
注意:我不使用Cordova

Cle*_*rem 12

我只是尝试了下面的黑客,它对我有用.这将覆盖webView中的长按.

UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]initWithTarget:nil action:NULL];
longPress.minimumPressDuration = 0.2;
[webView addGestureRecognizer:longPress];
Run Code Online (Sandbox Code Playgroud)

迅速

 let longPress:UILongPressGestureRecognizer = UILongPressGestureRecognizer(target: nil, action: nil)
    longPress.minimumPressDuration = 0.2
    webView.addGestureRecognizer(longPress)
Run Code Online (Sandbox Code Playgroud)