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
or in objC
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];
相关文章推荐
- How to correctly set application badge value in iOS 8?
- How to correctly set application badge value in iOS 8?
- Here's an example that shows how to enumerate through the features of a selection set, returning the value of each field in the attribute table except for the geometry colum.
- How to set a hidden value in Razor
- How to set the sequence value while saving the record in OA Framework
- How to access a value defined in the application.properties file in Spring Boot ( Externalized Conf)
- how to set value for cmake arguement in command
- How to add a Custom Pull to Refresh in your iOS Application
- How to set a badge value on a UITabBarController item
- How to set the style in valuelist
- whatever how, this should be record and be researched later. ---- about how to enable gpio value set in mach_smdk6410.c
- How to set the QT Application icon in the windows.
- How to set user-defined-type as Oracle SP input parameter in .NET
- System.Data.SqlClient.SqlException: Cannot insert explicit value for identity column in table 'Food' when IDENTITY_INSERT is set to OFF
- How to Identify MDS user in intranet web application ?
- How to set user-defined-type as Oracle SP input parameter in .NET
- HOWTO: How to Use PeekMessage() Correctly in Windows
- How to enable Spanning Tree Portfast in Cisco Catalyst switch (IOS)
- How to hide the OK button in the dialog in .Net Compact Framework application?
- How to set background image of a component in GWTEXT