0

I want to determine which view touches occurred in for the entire application, for the purpose of logging touches so that I can go through the logs later and determine what the user did. I know I could subclass UIView and override touchesBegan/Ended to log those, but I am using many instances of UIButton, UISlider, etc in Interface Builder so that wouldn't work unless I also subclassed those classes.

For determining the time since last touch (for an idle screen timeout method) I already have UIApplication subclasses and sendEvent: overridden. The only way I can see to do what I want is to iterate through the main window's subviews, calling touchesForView: on the UIEvent passed into sendEvent:, but I was wondering if there was a cleaner way to tell which view was touched (whether it's through the sendEvent: method or not). Thanks!

Ned
  • 6,280
  • 2
  • 30
  • 34

1 Answers1

0

See if this will do what you want: Observing pinch multi-touch gestures in a UITableView

Community
  • 1
  • 1
Nimrod
  • 5,168
  • 1
  • 25
  • 39
  • Well, that wasn't exactly it but you helped with my related question so I'll give you the check. – Ned Oct 13 '10 at 15:08