Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的应用程序中使用 LocalNotification。它工作正常,但是一旦设置了 ApplicationIconBadgeNumber,就无法将其从 App 中删除。如何删除它?
您需要设置应用程序applicationIconBadgeNumber。例如在应用程序 didReceiveLocalNotification 中。
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notif { application.applicationIconBadgeNumber = notif.applicationIconBadgeNumber-1; }