I'd like to change the action event of a button in a storyboard in Xcode 9. In Xcode 8, when control clicking and dragging a button to the code, there was a way to set the action event. In Xcode 9, this selection is missing. Was this setting removed or can I find it somewhere else?
Thanks in advance.
In Xcode 9:
In Xcode 8:
NSButton
does not differentiate between events in the same way UIButton
does. Your example picture for Xcode 8 shows the popup that comes up after connecting a UIButton
.
If you want to invoke the IBAction for multiple events, you can use sendAction(on:)
.