2

So I'm trying to capture the following behavior in this exact sequence

touch 1 STARTED
touch 1 moved
touch 1 moved

touch 2 STARTED
touch 2 moved
touch 2 ENDED

touch 1 moved
touch 1 moved
touch 1 ENDED

But instead they are coming back in the wrong order:

2011-12-02 14:55:37.187 coreplotround2[7396:707] touch 1 STARTED
2011-12-02 14:55:41.182 coreplotround2[7396:707] touch 1 moved
2011-12-02 14:55:41.582 coreplotround2[7396:707] touch 1 moved

2011-12-02 14:55:41.743 coreplotround2[7396:707] touch 2 STARTED
2011-12-02 14:55:41.902 coreplotround2[7396:707] touch 1 moved
2011-12-02 14:55:41.904 coreplotround2[7396:707] touch 2 moved <---- at this point my 2nd finger is released!!

2011-12-02 14:55:45.533 coreplotround2[7396:707] touch 1 moved
2011-12-02 14:55:45.533 coreplotround2[7396:707] touch 1 moved
2011-12-02 14:55:45.533 coreplotround2[7396:707] touch 1 moved
2011-12-02 14:55:45.533 coreplotround2[7396:707] touch 1 moved
2011-12-02 14:55:45.533 coreplotround2[7396:707] touch 1 moved
2011-12-02 14:55:45.549 coreplotround2[7396:707] touch 1 ENDED
2011-12-02 14:55:45.566 coreplotround2[7396:707] touch 2 ENDED

The problem is that the touch 2 ENDED is coming at the same time as touch 1 ENDED even though touch 2 ended MUCH earlier.

I'm using the methods touchesBegan, touchesMoved, touchesEnded.

Anyone know why?

Joe
  • 659
  • 1
  • 8
  • 17
  • It's not very easy to tell with the given information. Can you post a snippet of your touches code? Also, sometimes if you overlap touches the iPhone gets confused and combines them into one. – Daniel G. Wilson Dec 03 '11 at 03:21

1 Answers1

0

I discovered why. I subclassed an object from the Core Plot graphing library. This object was a subclass of UIView so I expected it to receive touches. I therefore redeclared the touch listeners and tried to experiment see how they behaved.

I believe something weird is happening in this particular Core Plot object that is screwing with the order of touches. I couldn't tell you what that is.

I discovered this by creating a new project with an empty view and testing multitouch.

Instead of subclassing Core Plot, I decided to create a UIView on top of it to intercept the multitouches and then call the appropriate delegates in Core Plot.

Joe
  • 659
  • 1
  • 8
  • 17