在这段代码中,我添加了动作通知,但我没有采取行动原因?

时间:2017-09-14 10:29:55

标签: ios iphone swift swift3

//指定通知类型。

dummy

// stopAction.isDestructive = false // stopAction.isAuthenticationRequired = false

    let notificationTypes: UIUserNotificationType = [UIUserNotificationType.alert, UIUserNotificationType.sound]

    // Specify the notification actions.
    let stopAction = UIMutableUserNotificationAction()
    stopAction.identifier = Id.stopIdentifier
    stopAction.title = "Dismiss"
    stopAction.activationMode = UIUserNotificationActivationMode.background

// snoozeAction.isDestructive = false // snoozeAction.isAuthenticationRequired = false

    let snoozeAction = UIMutableUserNotificationAction()
    snoozeAction.identifier = Id.snoozeIdentifier
    snoozeAction.title = "Snooze"
    snoozeAction.activationMode = UIUserNotificationActivationMode.background

请检查上面的代码给我解决方案.....!

0 个答案:

没有答案