Detect Other Button click (NSUserNotification)

前端 未结 2 1794
难免孤独
难免孤独 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:17

    After... uhm.... "checking" out the mail app's code... I found a suspicious function in their notification controller class...

    - (void)userNotificationCenter:(NSUserNotificationCenter *)center didDismissAlert:(NSUserNotification *)alert
    

    I have no idea why apple don't want to add this function to the NSUserNotificationDelegate... but I tested this out in my app and it works!!!

提交回复
热议问题