您的位置:首页 > 移动开发 > IOS开发

IOS push消息的数字不减少的问题

2015-05-15 15:39 232 查看
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");

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: