开发者可以访问的最低级别的官方触摸输入API是什么? (iPhone)
开发者可以访问的最低级别的官方触摸输入 API 是什么? (iPhone)
What's the most low-level official touch input API which can be accessed from developers? (iPhone)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据我的经验,可以拦截和处理所有触摸的最低级别是 UIApplication(它派生自 UIResponder)。这里没有什么真正困难的,因为你只需要覆盖:
According to my experience the lowest level where you can intercept and handle all the touches is UIApplication (its derived from UIResponder). There is nothing really hard here, as you only have to override:
触摸 UIResponder 类内部的对象。
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/cl/UIResponder
您可以访问touchesMoved、touchesBegan和触动结束。你几乎可以用这些做任何事情。
The touches objects inside of a UIResponder class.
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/cl/UIResponder
You have access to touchesMoved, touchesBegan, and touchesEnded. You can do just about anything with these.