博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IOS push消息的数字不减少的问题
阅读量:2258 次
发布时间:2019-05-09

本文共 624 字,大约阅读时间需要 2 分钟。

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");
}

转载地址:http://jmycb.baihongyu.com/

你可能感兴趣的文章
“Can’t be opened because Apple cannot check it for malicious software“ 解决方案
查看>>
Linux 中ifconfig和ip addr命令查看不到ip解决方法
查看>>
PL/SQL developer连接oracle出现“ORA-12154:TNS:could not resolve the connect identifier specified”问题的解决
查看>>
Oracle PLSQL 导出数据table xx contains one or more CLOB columns 解决方案
查看>>
如何解决谷歌Chrome浏览器空白页的问题
查看>>
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题
查看>>
STlink下载出现st-link usb communication error解决方法
查看>>
关于MATLAB中xlswrite函数写数据出现服务器异常情况的解决办法
查看>>
解决java前后端分离端口跨域问题
查看>>
MySql Unknown column 的解决方案
查看>>
ORA-04030: 在尝试分配...字节(...)时进程内存不足的原因分析解决方法
查看>>
开发中内存溢出问题及解决
查看>>
时间序列异常检测
查看>>
解决从本地文件系统上传到HDFS时的权限问题
查看>>
.Net Core 3.0 gRPC部署问题解决
查看>>
PHP下ajax跨域的解决方案之CORS
查看>>
无法远程访问Mysql的解决方案
查看>>
【转】QT 串口QSerialPort + 解决接收数据不完整问题
查看>>
Jmeter安装出现Not able to find Java executable or version问题解决方案
查看>>
SSH登录很慢问题的解决
查看>>