How to pass a 'tap' to UIButton that is underneath UIView with UISwipeGestureRecognizer?

后端 未结 4 1846
伪装坚强ぢ
伪装坚强ぢ 2021-02-07 13:09

I have a UIButton underneath a (transparent) UIView. The UIView above has a UISwipeGestureRecognizer added to it, and that is its only purpose - to detect certain swipe gestures

4条回答
  •  独厮守ぢ
    2021-02-07 13:22

    In my case, I fixed it by not using a button, but rather a UITapGestureRecognizer. My pan gesture recognizer was added to the background view, and the tap gesture was added to a view above it.

提交回复
热议问题