ScrollView gesture recognizer eating all touch events

前端 未结 9 816
北恋
北恋 2020-11-27 03:45

I have a UIScrollView to which I added a single tap gesture recognizer to show/hide some UI overlay using:

UITapGestureRecognizer *singleTap = [         


        
9条回答
  •  半阙折子戏
    2020-11-27 04:04

    You can capture any kind of gestures in the UIscrollView. Make sure you also handle some of the default properties as well like set cancelsTouchesInView property to false, it is true by default. Also give some tag nos to your sub views to distinguish in selectors. & also enable their User interaction to true.

    let tap = UITapGestureRecognizer(target: self, action:

    selector(didTapByUser(_:)))

提交回复
热议问题