Nico Nico - 2 months ago 13
Objective-C Question

How to avoid multitouch on a UIView

I have a view that contains several

UIButtons
. In the Interface Builder, the box
Multiple Touch
is not checked for the view nor the buttons. Programmatically I never activate the multi touch. Though, I still can select (press) several button at the same time which obviously give so weird results.

Why does it act like this while I didn't activate Multi Touch?

Answer Source

apple multipleTouchEnabled document

When set to YES, the receiver receives all touches associated with a multi-touch sequence. When set to NO, the receiver receives only the first touch event in a multi-touch sequence. The default value of this property is NO.

Other views in the same window can still receive touch events when this property is NO. If you want this view to handle multi-touch events exclusively, set the values of both this property and the exclusiveTouch property to YES.