Gesture recognition with UIWebView

前端 未结 6 1395
孤街浪徒
孤街浪徒 2021-02-04 10:58

I have set up some gesture recognition in an app that I\'m building. One of the gestures is a single finger single tap, which hides the toolbar at the top of the screen. Works g

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-04 11:44

    Try wrapping your UIWebView in a UIView container and set your gesture recognizers on the container view. Touch events that are not handled by the UIWebView will be passed up the view hierarchy and be intercepted by your container view, assuming it implements the appropriate handlers (and it is these handlers that should implement the code for hiding the toolbars...).

提交回复
热议问题