views:

24

answers:

1

Hey all,

Anyone have any idea how to prevent an app from letting more than five touches be added? Maybe someone who has a better knowledge of the touches system can explain it to me as well.

Basically, my app has 8 pushable buttons on screen, and up to 5 should be able to be pressed. If more than 5 fingers are present, the ipod touch drops the first touch in the set.

I assume that this is due to the fact that an iphone can't handle more than 5 touches with its hardware. Can anyone tell me how to set it so that any 6th or greater touch is ignored instead of replacing a previous touch?

A: 

"Can anyone tell me how to set it so that any 6th or greater touch is ignored instead of replacing a previous touch?"

The answer is: unfortunately there is NO way to do this. There is no general sort of "ignore touches after N" setting in iOS. So that's that.

You just have to program it by hand in your situation. For example -- just have a boolean "tooManyTouches" and set it to true when you've had enough; subclass your buttons to do nothing if tooManyTouches is true, or, add a view on top that only lets so many touches through, or whatever you prefer.

BTW the iPad easily does 10 or 11 touches. Get the (fantastic) app Uzu to see how it works.

Joe Blow
Huh. That's too bad that it won't stop further touches. The real problem is that it seems to kick out the touch that is in the 1st spot of the set, and I need to track that. Ah well, thanks!
XenElement
Yes, you have to track them all completely and totally manually - and that's that. Hope it helps!
Joe Blow