objective-c - 跟踪滑动

标签 objective-c ios cocoa-touch cocos2d-iphone core-graphics

有没有办法让我检查滑动手势是否经过屏幕上的特定点?

我正在努力实现这样的目标:

http://screenshots.en.sftcdn.net/en/scrn/3337000/3337188/dot-lock-03-356x535.jpg

如果跟踪滑动的方法不适合实现此目的,请告诉我。

谢谢。

最佳答案

我不认为滑动手势是您想要的。您最好使用 touchesBegan:withEvent: 检测初始触摸,然后在收到touchesEnded:withEvent:touchesCancelled:withEvent: 消息。

关于objective-c - 跟踪滑动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9503966/

相关文章:

ios - WatchKit,我应该从 ExtensionDelegate 更新 UI 吗?

ios - 在后台触摸时关闭 UIActivityIndi​​catorView

cocoa-touch - 将 Action 绑定(bind)到 UIButton

ios - 添加导航 Controller 可防止在 Root View Controller 中调用 updateViewConstraints

ios - 如何快速使用滑动手势翻转 x 和 y 轴上的图像?

objective-c - 在 OpenGL es (Iphone) 中使用 Vertex Buffer Objects (VBO) 来提高性能

ios - 在 tableViewCell 中添加 tableView

ios - 获取细胞索引-偷看和流行

iphone - 如何检测 View 中任意位置的点击?

iphone - 当满足特定条件时,如何删除在运行时创建的对象?