I am having difficulty implementing an action for an NSMenuItem in Swift. Normally, you implement the action like this in Objective-C:
- (void) asdf:(id)sender
This works perfectly fine, after setting up the action in the first responder like so:
However, after rewriting my view controller in Swift, the following new method doesn't seem to be called:
func asdf(sender: AnyObject?)
It doesn't seem to work, even though both the Obj-C and Swift versions are for the same view controller subclass.