您的位置:首页 > 移动开发

How to correctly set application badge value in iOS 8?

2014-09-05 17:38 501 查看
o modify the badge under ios8 you have to ask for permissions
let settings = UIUserNotificationSettings(forTypes: UIUserNotificationType.Badge, categories: nil)
UIApplication.sharedApplication().registerUserNotificationSettings(settings)


or in objC
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: