- (void)viewDidLoad {
[super viewDidLoad];
//1. 消息提醒数字
UIApplication *app = [UIApplication sharedApplication];
//注册用户的通知.
UIUserNotificationSettings *userNotice = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];
[app registerUserNotificationSettings:userNotice];
app.applicationIconBadgeNumber = 15;
}
网友评论