Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种方法来获取所有当前的触摸,即使没有发生任何事件。我知道,[UIEvent allTouches]但我需要能够看到“这些都是屏幕上的触摸”,即使它们都没有改变。似乎应该是可能的,因为allTouches可以访问尚未更新的触摸,因此手机正在跟踪它们。
[UIEvent allTouches]
allTouches
尝试 hitTest:withEvent 并使用 pointInside:withEvent 进行过滤。
覆盖 touchesBegan 和 touchesEnded,并将当前点与事件中的缓存点进行比较。