简体   繁体   English

如何找出图标徽章计数?

[英]How to find out the Icon Badge count?

I'm using push notifications on my iOS app and everything is working great. 我在我的iOS应用上使用了推送通知,并且一切正常。

The icon badge is working and when I open the app I clear it with this code: 图标徽章正在运行,当我打开应用程序时,我会使用以下代码清除它:

    [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0];

But before clearing it I would like to find out what is the badge count to make some changes on the app according to the number of notifications the user has when opening the app. 但是在清除它之前,我想根据用户打开应用程序时收到的通知数量,找出可以对应用程序进行一些更改的徽章计数。

Is it possible to do get this number? 有可能得到这个号码吗?

Thanks! 谢谢!

[UIApplication sharedApplication].applicationIconBadgeNumber

尝试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM