Differentiating Between UITouch Objects On The iPhone
- by Jasarien
Hey guys,
I'm trying to differentiate between two (or more) UITouch objects on the iPhone.
Specifically, I'd like to know the order in which the touches occurred.
For instance, in my -touchesBegan:withEvent: method I get an NSSet of UITouch objects. Now I can find out how many touches there are, but, which object represents which finger?
I notice the timestamp property on UITouch - is this what I'm looking for? I see how that would be useful to obtaining the last or first touch - providing the touches don't mutate...
Therein lies my problem. I can use the timestamp to single out the latest touch, but then the touch that occurred first moves, and IT becomes the latest touch...
At the end of this exercise, I'd like to be able to implement the "pinch" gesture to zoom in or out, etc.
Any help would be greatly appreciated, thanks.