How to pass single touch events to super view in UIWebView?

梦想的初衷 提交于 2019-12-11 16:19:36

问题


I am using UIWebView to display pdf. I wanna handle touch events on webview. There are two conditions, my WebView should handle double touch events and gestures, and i wanna pass single tap/touch events to super view.

Can any one please tell me how to differentiate the touch events in UIWebView and how to pass specific touch events to its super view?

to get the touch events i am subclassing the uiwebview and im overriding the hitTest method in subclass.


回答1:


If that post is not answering your question, you should check out this article.

I took a similar but slightly different approach: I subclassed a UIView, which contains a UIWebView (and other controls), and override the hitTest:withEvent: method.



来源:https://stackoverflow.com/questions/3332367/how-to-pass-single-touch-events-to-super-view-in-uiwebview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!