我正在寻找在iOS 10中实现UIUserNotificationSettings的替代方法。
苹果文档提供了以下框架供进一步使用。UNNotificationSettings链接在这里。
是否有人可以帮助我使用UNNotificationSettings而不是UIUserNotificationSettings实现以下示例代码?
let notificationSettings = UIUserNotificationSettings(
forTypes: [.Badge, .Sound, .Alert], categories: nil)
application.registerUserNotificationSettings(notificationSettings)