Display banner for NSUserNotification while app is frontmost
问题 I want to display user notifications while the app is frontmost. I found the code below, but I'm not sure how to use the delegate: it seems to just return a boolean value. class MyNotificationDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDelegate { func applicationDidFinishLaunching(aNotification: NSNotification) { NSUserNotificationCenter.defaultUserNotificationCenter().delegate = self } func userNotificationCenter(center: NSUserNotificationCenter,