1

I have a subclass of UIView called BigView that overrides touchesMoved (among other things) like so:

@implementation BigView
- (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    NSSet * viewTouches = [event touchesForView:self];
    NSLog(@"set of touches: %@", viewTouches);
}
@end

My BigView instance also has a subview (regular UIView instance) - when I touch inside that subview, the above touchesMoved method gets called, but viewTouches comes up null. The subView doesn't override any of the event handling methods (touchesBegan, touchesMoved, etc). I would expect the touch count for a view to include all of the touches inside its subviews, but it doesn't seem to be working that way. Am I doing something wrong in the code, or is this the way it should work and I don't understand why? (If the latter, why is this better?)

Thank you!

Gregor
  • 515
  • 6
  • 17

0 Answers0