Sendbird UIKit for iOS provides themes to help you customize the style of your app. Through simple configurations, you can easily switch between
Dark themes and apply custom colors and fonts to the views.
SBUTheme is a singleton class that is used to configure themes. If you don't want to use the default user interfaces provided by UIKit, you can customize them by using the
SBUTheme class. By customizing the theme of the view controller, you can apply the same custom theme to all its module components.
If you wish to set a global theme to each key function in the client app, you can do so by using setter methods such as
setChannelList in the corresponding theme class of each view controller.
UIKit for iOS provides two global themes:
Light theme is the default global theme but you can change it by using the
This is the default theme for UIKit.
You can also apply the
Dark theme to your app by following the code below.
Note : The global theme should be configured prior to setting the view controller or creating a chat view.
Instead of using the provided
Dark themes, you can customize the global theme by configuring
SBUTheme and passing it as an argument to a parameter in the
SBUTheme with default values as shown below.
If you wish to customize the
SBUTheme class instead of using the default values, refer to the code below.
Light theme appears by default when a view controller is initialized. The following table shows the customizable properties of the
|Property name||Type||Where to use|
To change the theme of the channel list, refer to the code below.
Note : Call the
setupStylemethod to update your user interface.