UIApplication图标徽章编号仍在重新安装 [英] UIApplication icon badge number remains at re-install

查看:144
本文介绍了UIApplication图标徽章编号仍在重新安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重新安装时不会删除UIApplication徽章编号。

The UIApplication badge number is not deleted at reinstall.

如果我在徽章的值为非零值时卸载应用程序,然后重新安装,徽章仍会显示在新安装中。

In case I uninstall the application when the badge has a non zero value, and then re-install it, the badge still appears in the new installation.

我按以下方式更新徽章编号:

I update the badge number in the following manner:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:badgeNumber];

试图找到解决方案 - 当应用程序终止时发出一些通知,这样我就可以删除徽章......无法使用applicationWillTerminate。有什么建议吗?

Tried to find a solution - some notification when the application terminates so I can remove the badge... Couldn't make it with applicationWillTerminate. Any suggestions?

推荐答案

Apple实际上已做出回应,这是预期的行为,徽章在卸载后会保留一段时间(完全是immediat重新安装的情况。)

Apple actually responded and this is the expected behavior, the badge remains for a short period after uninstall (exactly for the case of an immediat re-install).

这篇关于UIApplication图标徽章编号仍在重新安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆