How to connect multiple buttons in a storyboard to a single action?

后端 未结 7 1087
梦谈多话
梦谈多话 2020-12-03 10:16

I\'m currently using Xcode 4.6 and I\'m simply wondering how to select multiple buttons across different UIViews, but under a single view controller. CMD clicking doesn\'t s

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 10:57

    You can connect multiple buttons to a single action without selecting them all at once.

    However, after creating the action, you need to save the source file containing the action before Xcode will let you connect another control to the action.

    I did this with Xcode 4.6.2:

提交回复
热议问题