Search code examples
iosobjective-cuiwebviewhittesttouches

TouchesBegan: in UIWebView


Im trying to add gestures in my web view, like Mercury Web Browser. Im trying to use touches to detect if 2 fingers are tapped on screen and disable scrolling of web view. Is this possible by the UIGestureRecognizer anyways? If not, how can i get touches working with UIWebView? Ive tried changing hittest: method and adding a view over the web view. Nothing works for me.


Solution

  • Yes it is supported by gesture recognizers. You can add UITapGestureRecognizer to your web view and set its numberOfTouchesRequired property to 2.