如何检查通知的应用程序设置?
How can I check app settings for notifications?
这是我感兴趣的:
如何在代码中访问它,尤其是设置了什么警报样式?
您可以使用currentUserNotificationSettings
方法:
UIApplication.sharedApplication().currentUserNotificationSettings()
它将return UIUserNotificationSettings
对象。
查看 UIApplication Class Reference 了解更多信息。
这是我感兴趣的:
如何在代码中访问它,尤其是设置了什么警报样式?
您可以使用currentUserNotificationSettings
方法:
UIApplication.sharedApplication().currentUserNotificationSettings()
它将return UIUserNotificationSettings
对象。
查看 UIApplication Class Reference 了解更多信息。