如何UNNotificationSettings
在 iOS 10 中使用获取通知类型?
在以前的 iOS 上,我会使用这个:
UIUserNotificationSettings *notificationSettings = [[UIApplication sharedApplication] currentUserNotificationSettings];
Bool active = notificationSettings.types == UIUserNotificationTypeNone ? NO: YES;