views:

772

answers:

1

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]?

+1  A: 

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.

Corey Floyd