0

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!

Lucas
  • 16,930
  • 31
  • 110
  • 182
Tutankhamen
  • 3,532
  • 1
  • 30
  • 38

2 Answers2

1

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

sigman
  • 1,291
  • 12
  • 13
0

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.

Tutankhamen
  • 3,532
  • 1
  • 30
  • 38