tags:

views:

225

answers:

2

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

A: 

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

Dan Lorenc
A: 

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.

dugla
What are you trying to achieve? ie. why would you want a UITouch for each tap? If you want to store the data within a UITouch for each tap, either deep copy the UITouch and store it somewhere or create a wrapper class that will hold the pertinent info
Benny Wong
Benny,I would like to use each to as a separate key into a dictionary of unique actions. Each UITouch having a unique pointer address would make this trivial. Without it I have to do a lot of tedious bookeeping. Sigh ...
dugla