Get all touches without UIEvent
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.
精彩评论