quitting xcode cocoa swift app
You should be able to just call terminate on the global NSApp
object.
@IBAction func ExitNow(sender: AnyObject) { NSApplication.sharedApplication().terminate(self)}
Edit With Swift 3 the code is now:
@IBAction func ExitNow(sender: AnyObject) { NSApplication.shared().terminate(self)}
Edit 2 With Swift 4 & 5 the code is now:
@IBAction func ExitNow(sender: AnyObject) { NSApplication.shared.terminate(self)}