Question

I would like to have each UITouch instance record a single tap. In other words, regardless of how close multiple taps occur in time, I would like them each to create a unique touch instance. Is this possible?

Thanks, Doug

Was it helpful?

Solution

What is behind this question is my need to associate a unique address with each UITouch instance for each tap.

I've been NSLog-ing in touchesBegan:withEvent: for a while now and I've come to the suprising realization that UITouch instances appear to be recycled over and over again (ie, the same pointer address appears in distinct touch sequences!) rather then create anew each time a touch sequence is initiated.

My goal is a single unique UITouch instance address with a tapCount = 1.

OTHER TIPS

You could include the delegate method to capture the multiple touches, and just have this method call your single touch method multiple times.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top