1

What i'm doing now:

[[NSUserNotificationCenter defaultUserNotificationCenter] removeAllDeliveredNotifications];

So my question is, how to leave notification in notification center?

serhii.syrotynin
  • 241
  • 1
  • 14

1 Answers1

0

You can always remove it as you are doing and then add it again making sure the NSUserNotificationCenter delegate class implements the shouldPresentNotification method as NO.

  • (BOOL)userNotificationCenter:(NSUserNotificationCenter*)center shouldPresentNotification:(NSUserNotification*)nsNotification { return NO; }
Miguel Garcia
  • 1,029
  • 5
  • 14