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

前端 未结 7 1091
佛祖请我去吃肉
佛祖请我去吃肉 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:07

    Just set recognizer.state in your handlePan(_ recognizer: UIPanGestureRecognizer) method to .ended or .cancelled

提交回复
热议问题