Mac OS X NSUserNotificationCenter notification get dismiss event/callback

前端 未结 4 1395
猫巷女王i
猫巷女王i 2020-12-31 06:39

In our app we are displaying Notification Center notifications in alert style.

Displaying notification works fine, as well as we get callback when user interacts wit

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-31 07:17

    In Swift 3

    func userNotificationCenter(_ center: NSUserNotificationCenter, didDismissAlert notification: NSUserNotification) {
            print("dismissed")
        }
    

    This is not part of the NSUserNotificationDelegate but works perfectly

提交回复
热议问题