I have one NSAlert with two buttons:
var al = NSAlert()
al.informativeText = "You earned \(finalScore) points"
al.messageText = "Game over"
al.showsHelp = false
al.addButtonWithTitle("New Game")
al.runModal()
It's working perfectly, but I don't know how to recognize, which button was pressed by user.