So, UIResponder has methods like:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
My question is, what's the difference between the touches
parameter, and [event allTouches]
?
So, UIResponder has methods like:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
My question is, what's the difference between the touches
parameter, and [event allTouches]
?
All sets of touches are stored within event.
However, for convenience Apple separately provides the touch the triggered the touchesBegan method to be invoked as a parameter.
If you searched through [event allTouches] and compared them to the UITouch within [touches anyObject], you would find a match.