简体   繁体   中英

When should Notifications in the NSUserNotificationCenter be removed?

I wanted to ask about the best programming practices for using removeAllDeliveredNotifications() in the NSUserNotificationCenter. I couldn't find in any of the documentation if the NSUserNotificationCenter automatically removes delivered notifications after a certain period of time, or if the developer is responsible for removing the notifications. If the developer is responsible, when would be the optimal time or what would be the optimal place to remove the notifications, and should all delivered notifications be removed at once, or is there a recommended amount of time after which a delivered notification should be removed?

根据上述评论中的Truth Potatoe(如果他将其发布为答案,我会接受他的回答),“没有任何东西,从用户的角度来看,它对您的应用最有意义。无论何时或是否应该删除它们,这是一个见问题,对于一个应用程序有什么好处可能不适合另一个应用程序。”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM