2

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?

1 Answers1

1

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

salabaha
  • 2,468
  • 1
  • 17
  • 18
  • Can this be set in IB? `Multiple Touch` is unchecked. –  Jul 05 '16 at 12:40
  • Sure. Take a look at this unswear for hint how to do this http://stackoverflow.com/questions/12301256/is-it-possible-to-set-uiview-border-properties-from-interface-builder – salabaha Jul 05 '16 at 12:42