How can I tell a UIGestureRecognizer to cancel an existing touch?

前端 未结 7 1073
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 03:36

I have a UIPanGestureRecognizer I am using to track an object (UIImageView) below a user\'s finger. I only care about motion on the X axis, and if

7条回答
  •  离开以前
    2020-12-13 04:05

    How about this from the apple docs:

    @property(nonatomic, getter=isEnabled) BOOL enabled
    

    Disables a gesture recognizers so it does not receive touches. The default value is YES. If you change this property to NO while a gesture recognizer is currently recognizing a gesture, the gesture recognizer transitions to a cancelled state.

提交回复
热议问题