Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop multiple UIButton pressing?

Imagine I have a UIView and to that I add 2 UIButtons.

I find that I can put a finger on one button, then, holding the first, I can touch the 2nd button with another finger. Both buttons will show their UIControlStateHighlighted images.

Is there a way to stop the 2nd touch working? I thought that multipleTouchEnabled = NO was the answer, but seems not!

Any ideas?

like image 962
tony warriner Avatar asked Mar 20 '26 10:03

tony warriner


1 Answers

use a property of UIButton called exclusiveTouch

like image 142
anony Avatar answered Mar 23 '26 01:03

anony



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!