iOS applicationIconBadgeNumber(后台app红色角标)

为什么80%的码农都做不了架构师?>>>   hot3.png

float version = [[[UIDevice currentDevice] systemVersion] floatValue];

if (version >= 8.0) {
    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];
    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
}
UIApplication *app = [UIApplication sharedApplication];
app.applicationIconBadgeNumber = 123;


转载于:https://my.oschina.net/123009/blog/512863

你可能感兴趣的:(iOS applicationIconBadgeNumber(后台app红色角标))