如何使用UNNotificationSettings
獲取iOS 10中的通知類型?使用iOS 10中的UNNotificationSettings檢查通知類型
在以前的iOS,我會用這樣的:
UIUserNotificationSettings *notificationSettings = [[UIApplication sharedApplication] currentUserNotificationSettings];
Bool active = notificationSettings.types == UIUserNotificationTypeNone ? NO: YES;
所以你問如何使用'UNNotificationSettings'類? – Droppy
是的,你是對的......我無法找到使用枚舉的方式。 –
[在UILocalNotification棄用後檢查用戶通知是否啓用](https://stackoverflow.com/questions/46664177/check-whether-user-notifications-are-enabled-after-uilocalnotification-deprecati) –