IOS 程序图标添加数字

+(void)setAppIconNumber:(NSInteger)num{
    if ([UIParam getIOSVersion]>8.0) {
        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];
        [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
    }
    
    UIApplication *app = [UIApplication sharedApplication];
    // 应用程序右上角数字
    app.applicationIconBadgeNumber = num;
}

 

posted on 2015-07-29 17:10  大木哥  阅读(348)  评论(0编辑  收藏  举报

导航