This image picker show on Long press event. Just remove UILongPressGestureRecognizer
from your webview. Use following wkwebview extension.
extension WKWebView {
/// disable long press on Wkwebview
func removeLongTapGestures() {
for subView in self.scrollView.subviews {
if let recogniserz = subView.gestureRecognizers {
for recogniser in recogniserz {
if recogniser is UILongPressGestureRecognizer {
subView.removeGestureRecognizer(recogniser)
}
}
}
}
}
}
call this function removeLongTapGestures
in webview didFinish
delegate method.
webView.removeLongTapGestures()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.