tags:

views:

163

answers:

2

I am getting inconsistent results using multi-touch. I am trying to detect a 2 fingered swipe. Sometimes I successfully detect 2 touches, othertimes it appears as 1 touch but oscillating in position between the two fingers.

I created a test app to try to isolate this behaviour but I found that the test app behaved ok.

The app where the problem occurs has a number of sub views, and my touch detection code is on the root view. Could this be the problem? Do I need to include touch detection on every subview?

+2  A: 

You are not guaranteed to always get both touches in the array - for example if one finger were moving and the other were still, it would not appear in TouchesMoved. Just assume the finger is still down in the old place until reported otherwise.

Kendall Helmstetter Gelner
`[event touchesForView:self]` on the UIEvent will give you all touches, not just those that changed.
roe
A: 

After much poking around, I've realised that even when I get two fingered detection working well, there is still a high likelyhood that occasionally it will pick up 1 finger if only for a short while. In the case of my application that won't work because I am already using 1 finger movement for something else. So back to the drawing board

Ian1971