Search code examples
iosswiftsirisirikitsirishortcuts

Change color of Add to Siri button on INUIAddVoiceShortcutViewController in iOS?


I am trying to change the color of the Add to Siri button and the Cancel button on the view controller of type INUIAddVoiceShortcutViewController provided by Apple, but I couldn't find it in the documentation.

Is there any way to do this? Thanks in advance for your help.

Add to Siri view controller (INUIAddVoiceShortcutViewController) with orange tinted buttons.


Solution

  • The INUIAddVoiceShortcutViewController adopts this color from your app's tint color.

    You can try changing the presenting view controller's tint color prior to presenting (and then changing it back upon dismissal).

    Or you might want to try setting your global tint color using UIAppearance in the same way (before the presentation and after dismissal). For example, you can set your app window's tintColor like this:

    window?.tintColor = UIColor.blueColor()