开发者

Get all touches without UIEvent

开发者 https://www.devze.com 2022-12-17 09:52 出处:网络
I\'m looking for a way to get all the current touches even if no event has occurred. I know about [UIEvent allTouches] but I need to be able to see \"these are all the touches on the screen\" even if

I'm looking for a way to get all the current touches even if no event has occurred. I know about [UIEvent allTouches] but I need to be able to see "these are all the touches on the screen" even if non开发者_开发技巧e of them has changed. It seems like it should be possible because allTouches can access touches which haven't been updated, so the phone is tracking them.


Override touchesBegan and touchesEnded, and compare the current point against the cached point from the event.


Try hitTest:withEvent and filter with pointInside:withEvent.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号