Link Search Menu Expand Document

UI Customization

Most of chat UI components can be customized to match your application look-and-feel. There are 5 separate appearance objects that correspond to different component properties:

public struct Appearance {
    public var color = Color()
    public var font = Font()
    public var string = Appearance.String()
    public var elements = Appearance.Elements()
    public var image = Appearance.Image()
}

Each appearance object contains a set of customizable components. Here is an example of how to tune fonts and colors of channels list:

Appearance.default.color.channelCell.title = UIColor.black
Appearance.default.font.channelCell.titleFont = UIFont.boldSystemFont(ofSize: 12)

Some components can be customized more deeply by configuring view factory for that component type:

Appearance.default.elements.buttons.pollButton = {
    let button = CTAButton(type: .custom)
    button.tintColor = R.color.pink()
    button.setTitle(R.string.meetingChat.reply(), for: .normal)
    return button
}