iOS: setting Exclusive Touch to all buttons in a view

后端 未结 8 511
灰色年华
灰色年华 2021-01-03 16:17

My app has many buttons in a Window and I want to set Exclusive Touch all of them together. Do you have any suggestion about this? Thanks

8条回答
  •  甜味超标
    2021-01-03 17:07

    If these buttons are all in the same view, you can loop through the view's subviews, test for whether the particular subview is a button (or test for a tag if you have one set) and set exclusiveTouch on each.

提交回复
热议问题