How does an iPhone multitouch event fire?

I have read the SDK doc but cannot figure out some of the details, you need help.

for

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

      

  • what's the difference between touches

    and [event allTouches]

    ?
  • if the user lets go of one finger but still has other fingers on the screen, does the last event make another finger in touches

    or [event allTouches]

    ?

thank

+1


source to share


1 answer


The Touches set should only represent touches that are relevant to the current call. On completion of touches, the touches parameter will contain ONLY the touch that has ended, while the [UIEvent allTouches] array will contain all touches at the moment, including the one that has just finished.



+2


source







All Articles