Detect Other Button click (NSUserNotification)

前端 未结 2 1767
难免孤独
难免孤独 2021-01-13 17:53

I\'ve searched all over the internet but the only method found was by looping through

- (void)userNotificationCenter:(NSUserNotificationCenter *)center didDe         


        
2条回答
  •  有刺的猬
    2021-01-13 18:25

    Swift >= 4 version:

    @objc
    func userNotificationCenter(_ center: NSUserNotificationCenter, didDismissAlert notification: NSUserNotification)
    

    Make sure you add the @objc annotation, otherwise the objective-C runtime won't be able to see your delegate method.

提交回复
热议问题