I have written my first swift OS/X application in XCode 6. It all works except I cannot figure out how to exit the app. I have a button to exit and the ExitNow
function defined as follows:
@IBAction func ExitNow(sender: AnyObject) {
// ???
}
I cannot figure out what the code would be. By searching online I've found various options, but they were either in Objective C or too general for me to comprehend. I would appreciate an example which would behave the same way as cmd-Q
.