touchMoved 和 Swipe 之间的区别?

发布于 2024-10-09 16:11:25 字数 120 浏览 0 评论 0原文

我在 iPad 中旋转圆圈。我已经插入了 swipegesture 事件。但是我想在 touchMoved 和 swipeEvent 中进行不同的操作。但是当我触摸移动时,会调用 swipw 手势,我必须做什么,有什么帮助吗?

i am rotating circle in iPad.i have inserted swipegesture event.but I want to different operations in touchMoved and swipeEvent.but when I do touch moving , swipw gesture is called, what i have to do , any help please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦萦几度 2024-10-16 16:11:25

滑动:

NSEventTypeSwipe
代表滑动手势的事件。
适用于 Mac OS X v10.6 及更高版本。
在 NSEvent.h 中声明。

touchMoved

当一根或多根手指在关联视图中移动时发送到接收者。

  • (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

所以当任何事情发生时,滑动不能用于编码某些事情,比如touches.swipe 用于识别触摸事件。

swipe:

NSEventTypeSwipe
An event representing a swipe gesture.
Available in Mac OS X v10.6 and later.
Declared in NSEvent.h.

and

touchMoved:

Sent to the receiver when one or more fingers move in the associated view.

  • (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

so swipe cant be use to code some thing when any thing happens like touches.swipe is use for recognizing touch event.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文