user187676
user187676

Reputation:

Exclusive touch on UIControl

I have an UIButton and UISwitch. A user could touch both with one finger each at the same time and release - triggering 2 separate TouchUpInside @IBActions.

How can I tell a control that it's touches must be exclusive, without creating a subclass?

Upvotes: 2

Views: 500

Answers (1)

salabaha
salabaha

Reputation: 2478

UIControl is subclass of UIView so you can directly set exclusiveTouch = true on any UI control.

Upvotes: 1

Related Questions