什么是触摸取消事件,它与触摸结束有何不同

发布于 2024-08-17 16:37:31 字数 40 浏览 4 评论 0原文

我只是不明白苹果所说的触摸取消事件是什么意思以及它是如何被调用的。

I just don't understand what apple means by the touches canceled event and how is it called.

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

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

发布评论

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

评论(1

箜明 2024-08-24 16:37:31

我不太确定蒂姆是否回答了你的问题,所以我会尝试一下。

当操作系统需要中断用户时,会调用touchesCanceled。它让您有机会清理在touchesBegan 和touchesMoved 中所做的任何事情。

更具体地说,当用户将手机放在他/她的脸上关闭屏幕时,或者出现来电或新短信等通知时,就会调用它。

I'm not really sure Tim addressed your question so I'll take a shot at it.

touchesCanceled is called when the OS needs to interrupt the user. It gives you a chance to clean up whatever you've been doing in touchesBegan and touchesMoved.

More specifically, it is called when the user puts the phone to his/her face turning the screen off, or if a notification like incoming call or new text message occurs.

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