How to customize the Business Messaging SDK Widget UI?
Customizing the theme
Predefined themes
The SDK UI has two predefined themes: light and black.
The following methods help you apply these themes.
ZDTHEMETYPE.LIGHT
ZDTHEMETYPE.DARK
Methods for applying the light (Default) theme:
Swift
- ZDThemeManager.setTheme(type: .white)
Objective-C
- [ZDThemeManager setTheme:ZDThemeTypeWhite];
Methods for applying the dark theme
Swift
- ZDThemeManager.setTheme(type: .dark)
Objective-C
- [ZDThemeManager setTheme:ZDThemeTypeDark];
iOS 13 allows users to set a dark or light theme throughout the system. For iOS 13 and above, you can set the system theme in the GC widget.

In such cases, the widget will be in the same theme as the rest of the OS.
Swift
- ZDThemeManager.setTheme(type: .system)
Objective-C
- [ZDThemeManager setTheme:ZDThemeTypeSystem];
• ZDThemeType.system is available only for iOS 13 and above versions.
• By default, the system theme will be applied for iOS 13 and above, and the light theme will only be used for earlier iOS versions.Customized themes
You can customize the default light and dark themes to make the SDK look more like your applications.
To update the default light theme:
Swift
- ZDThemeManager.updateTheme(theme:<#ZDThemeProtocol#>)
Objective-C
- [ZDThemeManager updateThemeWithTheme:<#ZDThemeProtocol#>];
To update the default dark theme:
Swift
- ZDThemeManager.updateDarkTheme(theme: <#ZDThemeProtocol#>)
Objective-C
- [ZDThemeManager updateDarkThemeWithTheme:<#ZDThemeProtocol#>];
ZDThemeProtocol provides a list of properties, such as primaryTextColor and navigationBarTextColor, for additional color customization. The colors you set in the class will override the default theme.
All properties in the protocol are optional. You can create any class conforming to this protocol, implement one or more properties, and pass an object of that class to the updateTheme or updateDarkTheme method.

Updating the SDK's theme is different from setting a theme type. Depending on the theme type you have set, the SDK will always be in a dark or light theme.