开发者可以访问的最低级别的官方触摸输入API是什么? (iPhone)

发布于 2024-08-22 06:21:26 字数 44 浏览 9 评论 0原文

开发者可以访问的最低级别的官方触摸输入 API 是什么? (iPhone)

What's the most low-level official touch input API which can be accessed from developers? (iPhone)

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

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

发布评论

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

评论(2

撧情箌佬 2024-08-29 06:21:26

根据我的经验,可以拦截和处理所有触摸的最低级别是 UIApplication(它派生自 UIResponder)。这里没有什么真正困难的,因为你只需要覆盖:

- (void)sendEvent:(UIEvent *)event
{
    [super sendEvent:anEvent];
    /* Place your custom */
    /* processing code here*/
}

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:

- (void)sendEvent:(UIEvent *)event
{
    [super sendEvent:anEvent];
    /* Place your custom */
    /* processing code here*/
}
盗心人 2024-08-29 06:21:26

触摸 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.

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