//删除已经显示过的通知(已经存在用户的通知列表中的)
[[NSUserNotificationCenter defaultUserNotificationCenter] removeAllDeliveredNotifications];
//删除已经在执行的通知(比如那些循环递交的通知)
for (NSUserNotification *notify in [[NSUserNotificationCenter defaultUserNotificationCenter] scheduledNotifications])
{
[[NSUserNotificationCenter defaultUserNotificationCenter] removeScheduledNotification:notify];
}
Mac NSUserNotification移除通知
最新推荐文章于 2021-04-15 09:49:40 发布