【发布时间】:2017-03-19 23:26:57
【问题描述】:
我正在使用以下代码请求推送和本地通知权限:
let application = UIApplication.shared
let settings: UIUserNotificationSettings = UIUserNotificationSettings( types: [.alert, .badge, .sound], categories: nil )
application.registerUserNotificationSettings( settings )
application.registerForRemoteNotifications()
在我采取行动之前,我需要等待用户接受或拒绝通知。我怎样才能做到这一点?
【问题讨论】:
-
查看
UIApplicationDelegate的文档。
标签: ios swift nsusernotification