How to cancel UIGestureRecognizer if subview's button pressed

后端 未结 4 606
说谎
说谎 2021-02-04 03:27

I am struggling to get the behaviour I would like from the gesture recognisers, specifically cancelling certain gestures if others have fired.

I have a scrollView set to

4条回答
  •  [愿得一人]
    2021-02-04 03:41

    You can subclass UIView and overwrite the -touchesBegan selector, or you can play with the opaque property of the subviews to make them "invisible" to the touches (if view.opaque = NO, the view ignores touch events).

提交回复
热议问题