检测整个屏幕上的触摸
我有许多附加了 GestureRecognizers 的 UIView。
我的问题是我希望用户能够触摸屏幕并拖动手指,并且我想跟踪他们的手指位置。
这是如何完成的,以便手势识别器不会被触发,但如果用户的手指开始沿着屏幕移动,它就会被跟踪。
谢谢
I have a number of UIViews with GestureRecognizers attached.
My issue is I want the user to be able to touch the screen and drag their finger and I want to track their finger location.
How is this done so that the gesturerecognizers dont get triggered, but that if the users finger starts to move along the screen it gets tracked.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过此方法处理当前识别的手势。
此方法会告诉您同时发现了哪两个手势,以便您可以选择其中之一。换句话说,您可以知道您的手指跟踪是您想要识别的内容,而不是滑动。
You can handle currently recognized guestures through
This method will tell you what two gestures it found at the same time, so you can make choice to choose one over the other. In another words, you can tell that your finger tracking is what you want to recognize in stead of swipe.