I want to set the action and target for an NSButton in swift. In previous versions of Xcode, there were setAction and setTarget methods, but those aren't included in the Cocoa library anymore (or they aren't as far as I can tell). What is the equivalent in Swift with the new library for for:
NSButton *myButton = [NSButton alloc];
[myButton setTarget:self];
[myButton setAction:@selector(myMethodToCallOnClick:)];