Search code examples
iosswiftapple-push-notificationsactionable-notification

Change actionable push notification button color and font


I have implemneted actionable push notification in my app and it is working fine. I have two actions "YES" and "NO". I want show the "NO" button font in red color. can any one let me know how to customize those buttons

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

Solution

    • destructive

    By passing in the destructive option, the action is visually highlighted to indicate to the user the action is destructive.

    I was not able to customize but the above option solved my requirement.