【问题标题】:What is the touches canceled event, and how is it different from touches ended什么是 touches cancelled 事件,它与 touches end 有什么不同
【发布时间】:2023-03-31 13:30:01
【问题描述】:

我只是不明白 Apple 所说的 touches cancelled 事件是什么意思以及它是如何调用的。

【问题讨论】:

    标签: ios cocoa-touch uitouch touchescancelled


    【解决方案1】:

    我不确定蒂姆是否解决了你的问题,所以我会试一试。

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多