After iOS 13.4.1 update WKWebView not able to recognise tap gesture

227 Views Asked by At

After ios update to 13.4.1 to able to detect tap gesture in WKWebView, my code as follow:

override func viewDidLoad() {
        super.viewDidLoad()
        let tapGesture = UITapGestureRecognizer(target: self, action: #selector(viewTap) )
        tapGesture.delegate = self
        webview.addGestureRecognizer(tapGesture)
}

    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
      return true
    }

@objc func viewTap() {
    print("tap on viewTap...")
}
0

There are 0 best solutions below