注册推送通知时,我没有启用角标(Badge)警报...
- (void)registerForPushNotifications {
UIRemoteNotificationType notificationTypes = (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound);
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
}
...所以我不明白为什么会显示它。
我能弄清楚如何禁用角标(Badge)显示在我的图标上的唯一方法是通过重置应用委托(delegate)中的 applicationIconBadgeNumber
值,但这感觉有点老套。有没有什么可以让我简单地禁止角标(Badge)编号显示在我的应用程序图标上?
提前感谢您的智慧!
最佳答案
您是否尝试过从您的设备或模拟器中删除您的应用程序并重新构建它?并且请确保您没有在其他地方注册 UIRemoteNotificationTypeBadge
通知类型。
关于iphone - 如果我没有启用角标(Badge),为什么我的 iOS 应用程序图标会显示角标(Badge)编号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18156561/