Search code examples
iosobjective-ciphoneuitouchtouchesbegan

UITouch - Is it possible to disable multiple tapping


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


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.