event handling - iOS: How does multitouch affect touchesBegan, Moved and Ended? -
i don't have apple developer license yet, can't test out find out.
when touch screen 1 finger, know nsset sent touchesbegan has 1 uitouch object in it. when 2 touches occur @ once, set has 2 uitouch-es in it.
when have 1 finger down, , touch somewhere else too, assume touchesbegan fire again, have both uitouch objects in nsset? or 1 started?
i assume whatever answer is, holds true touchesmoved , touchesended, if not, let me know too?
thanks, peter
i tried:
- (void) touchesbegan:(nsset *)touches withevent:(uievent *)event { nslog(@"number of touches : %d", touches.count); (uitouch *touch in touches) { cgpoint loc = [touch locationinview:self.view]; nslog(@"location %f, %f", loc.x, loc.y); } }
it turns out yes, touchesbegan fire again when 1 touch held when making touch attempt, in case second fire reports "number of touches : 1" , location of second touch. don't know sure whether same true touchesmoved , touchesend, think so.
Comments
Post a Comment