【发布时间】:2015-07-12 18:02:50
【问题描述】:
尝试使用此代码通过远程通知设置徽章编号
UIUserNotificationType types = (UIUserNotificationTypeAlert|
UIUserNotificationTypeSound|
UIUserNotificationTypeBadge);
UIUserNotificationSettings *settings;
settings = [UIUserNotificationSettings settingsForTypes:types
categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
[application setApplicationIconBadgeNumber:7];
..
}
但我没有在图标上看到徽章。
是否有我遗漏的配置?
【问题讨论】:
标签: ios objective-c ios8 apple-push-notifications