Configuration guide
Chat UI provides global configuration options for various features to help you quickly build a chat application.
tip
Chat UI's NCChatUIConfig settings are applied in real time. Changes take effect during the next UI refresh or operation. We recommend completing all configurations after initializing Chat UI.
Configuration overview
Chat UI defines global configurations in the NCChatUIConfig.h file, organized into the following categories. Refer to the corresponding file for all available global configurations.
| Category | Description | API documentation |
|---|---|---|
| Message configuration | Controls message behaviors like auto-resend, foreground notifications, merge forwarding, typing status, and read receipts. | NexconnChatUI API documentation |
| UI configuration | Manages dark mode, layout direction, channel list appearance, channel avatars, message display, and title sizing. | NexconnChatUI API documentation |
| Font configuration | Adjusts font sizes. | NexconnChatUI API documentation |
Modifying Chat UI configuration
For iOS, use the NCChatUIConfig singleton (or the NCChatUIConfigCenter macro) to modify Chat UI settings. Each application has only one global Chat UI configuration.
Configuration examples:
Objective C
// Enable video files in media selection
NCChatUIConfigCenter.message.isMediaSelectorContainVideo = YES;
// Change default avatar style from rectangle to rounded
NCChatUIConfigCenter.ui.globalMessageAvatarStyle = NC_USER_AVATAR_CYCLE;
// Modify file type icons based on extensions
[NCChatUIConfigCenter.ui registerFileSuffixTypes:types];
Common configuration entry points
NCChatUIConfigCenter.messageNCChatUIConfigCenter.uiNCChatUIConfigCenter.font