1

I have a popup that has two buttons. How to avoid the scenario where in, the user uses two fingers and taps on the two different buttons at the same time? Is there a way by which we can specify only gesture is allowed at a time?

i_raqz
  • 2,919
  • 10
  • 51
  • 87

2 Answers2

13

You can also use -setExclusiveTouch on each of the buttons so that only one will register at a time. You don't need to disable multi-touch on your view either.

Bill Burgess
  • 14,054
  • 6
  • 49
  • 86
3

Don't enable multi touch, then the OS will only ever report 1 touch at a time. When editing your view in Interface Builder, there is an option "Multiple Touch". If the parent view that contains both buttons has this disabled, it will not report two taps at once

Dan F
  • 17,654
  • 5
  • 72
  • 110