Question

My application receives and process all touch events, received through UIWindow object. So, for every touch event I create a record and at any moment I can check how much fingers on the screen... Everething worked fine until I tried to use system gestures (switch between tasks, call task manager)... In this case i received all four touchesBegan events, but not tochesEnded. In other words my application doesn't receive any touch events if they are become system gestures.

The question is: How can I catch ALL touch events?

Thank You!

Was it helpful?

Solution

The trick is to handle correctly touchesCancelled:withEvent: which is fired when the application lose focus on multitasking gesture.

OTHER TIPS

I think I got the answer: So, I think it's impossible or incorrect to catch any touch event after application will resign its focuse. So, I just need to handle applicationWillResignActive and applicationDidBecomeActive events to catch and process my issue... In other words, I have to delete all my touch entries when my application loses the focuse.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top