IOS push消息的数字不减少的问题,在做这个问题的时候。发现设置数字为0不能用,这时这个设置为0是写在应用程序加载的函数里面。只有双击Home键出现减号的时候删掉运行才会数字清零。
因此我把这个清零的数字写在
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Clear application badge when app launches
application.applicationIconBadgeNumber = 0;
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
*/
NSLog(@"c");
}
本文探讨了iOS应用中Push通知图标上未读消息计数无法正确清零的问题,并提供了一个有效解决方案:将计数清零操作放在应用进入后台的方法中实现。
3270

被折叠的 条评论
为什么被折叠?



