The question is simple but extremely complicated: in UIResponder there are 4 methods for handling touches.
- touchesEnded:withEvent:event
– touchesBegan:withEvent:
– touchesMoved:withEvent:
– touchesCancelled:withEvent:
How do I detect if a touch stopped on the screen?
The problem is that I have to detect if something moved under a stationary touch (not cancelled or ended. It just doesn’t move) And because it doesn’t move, none of these methods gets called.
My idea was this:
I could add the touches to a NSMutableArray but then I’d have to update it for any touch move (and that’s a lot). Also this creates more problems, I need to detect which of the touches stopped and if any ended. And because I get an NSSet from UIResponder, I don’t have an organized array so… all kinds of problems.
I’m waiting for ideas.
i fixed it..and also found out something really cool about
UITouchwhat i did: in
in
in
doing this i have a
NSSetof all the touches on the screen at any given time, with position andUITouchPhase