2

我在我的应用程序中实现了可操作的推送通知,它工作正常。我有两个动作“是”和“否”。我想以红色显示“NO”按钮字体。谁能让我知道如何自定义这些按钮

   let yesAction = UNNotificationAction(identifier: "Yes", title: "YES", options: [.foreground])
   let noAction = UNNotificationAction(identifier: "no", title: "NO")
4

1 回答 1

2
  • 破坏性的

通过传入破坏性选项,该操作在视觉上突出显示以向用户指示该操作是破坏性的。

我无法自定义,但上述选项解决了我的要求。

于 2018-04-26T22:21:04.560 回答