views:

1001

answers:

1

I read the SDK document, but can not understand some detail, need some help.

for the touchesEnded: -(void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event

1) what's the difference between touches and [event allTouches]?

2) If user release one finger, but still other fingers on screen, does the later event still contains the finger in touches or [event allTouches]?

Thanks

+2  A: 

the Touches set should represent just those touches that are relevant to the current call. For touches ended, the touches parameter will contain JUST the touch that ended, whereas the [UIEvent allTouches] array will contain all touches currently in progress, including the one that just ended.

Ben Gottlieb
I got it. Thanks very much.
zhongshu