什么是触摸取消事件,它与触摸结束有何不同
我只是不明白苹果所说的触摸取消事件是什么意思以及它是如何被调用的。
I just don't understand what apple means by the touches canceled event and how is it called.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不太确定蒂姆是否回答了你的问题,所以我会尝试一下。
当操作系统需要中断用户时,会调用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.