Customize UI Kit

This guide helps you to customize, modify, and enable/disable features present in UIKit.

👍

Note:

CometChat SDK & UI Kit both need to be configured before starting the customization in UI Kit.


To Modify and customize UI Kit, you need to refer to the UIKitSettings class present in the UI Kit Library.
You will be easily able to modify the color, enable/disable some of the features which you won't require in your app.

🚧

Important

  • UI Kit Settings must be called before launching any UI Screen or UI Unified. By default, all settings will be enabled.
  • For advanced level customization, you can modify the source code of the library as per your requirement.

1. Color Settings

Sr No

Description

Code Snippet

Settings

Modify primary colour

UIKitSettings.primaryColor = UIColor.lightBlue

Requires Object of UIColor class


2. Tab bar settings

Sr No

Description

Code Snippet

Settings

Hide/Show recents chats tab

UIKitSettings.conversations = .enabled

You can show it using .enabled or hide it using .disabled.

Hide/Show calls tab

UIKitSettings.calls = .enabled

You can show it using .enabled or hide it using .disabled.

Hide/Show users tab

UIKitSettings.users = .enabled

You can show it using .enabled or hide it using .disabled.

Hide/Show groups tab

UIKitSettings.groups = .enabled

You can show it using .enabled or hide it using .disabled.

Hide/Show user information tab

UIKitSettings.userSettings = .enabled

You can show it using .enabled or hide it using .disabled.

Shuffle or re-arrange tabs

UIKitSettings.tabs = [.chats, .calls, .users , .groups, .settings]

You can re-arrange, remove or add tabs using this. This method takes the array of Controller which has following parameters:
1. .chats: Shows recents chats tab
2. .calls: Shows calls tab
3. .users: Shows users tab
4. .groups: Shows groups tab
5. .settings: Shows user information tab

Show real time connection indicator

UIKitSettings.connectionIndicator = .enabled

You can show it using .enabled or hide it using .disabled.


3. Recent Chat settings

Sr No

Description

Code Snippet

Settings

Show unread count

UIKitSettings.unreadCount = .enabled

You can show it using .enabled or hide it using .disabled.

Show search bar in chats

UIKitSettings.searchChats = .enabled

You can show it using .enabled or hide it using .disabled.

Show all users/groups or both

UIKitSettings.chatListMode = .both

You can show all users using .user or show groups using .group or show both of them using .both.


4. Call settings

Sr No

Description

Code Snippet

Settings

Enable audio call for user

UIKitSettings.userAudioCall = .enabled

You can show it using .enabled or hide it using .disabled.

Enable audio call for group

UIKitSettings.groupAudioCall = .enabled

You can show it using .enabled or hide it using .disabled.

Enable video call for user

UIKitSettings.userVideoCall = .enabled

You can show it using .enabled or hide it using .disabled.

Enable video call for group

UIKitSettings.groupVideoCall = .enabled

You can show it using .enabled or hide it using .disabled.

Enable sound for calls

UIKitSettings.enableSoundForCalls = .enabled

You can show it using .enabled or hide it using .disabled.

Show action messages for calls.

UIKitSettings.enableActionsForCalls = .enabled

You can show it using .enabled or hide it using .disabled.


5. User settings

Sr No

Description

Code Snippet

Settings

Show all users/friends

UIKitSettings.userInMode = .all

You can show all users using .all or show friends using .friends.

Show user presence

UIKitSettings.showUserPresence = .enabled

You can show it using .enabled or hide it using .disabled.

Show block user

UIKitSettings.blockUser = .enabled

You can show it using .enabled or hide it using .disabled.

Show search user

UIKitSettings.searchUsers = .enabled

You can show it using .enabled or hide it using .disabled.

Show view profile

UIKitSettings.viewProfile = .enabled

You can show it using .enabled or hide it using .disabled.


6. Group settings

Sr No

Description

Code Snippet

Settings

Show create group

UIKitSettings.groupCreation = .enabled

You can show it using .enabled or hide it using .disabled.

Show join or leave group

UIKitSettings.joinOrLeaveGroup = .enabled

You can show it using .enabled or hide it using .disabled.

Show delete group

UIKitSettings.allowDeleteGroup = .enabled

You can show it using .enabled or hide it using .disabled.

Show group members

UIKitSettings.viewGroupMembers = .enabled

You can show it using .enabled or hide it using .disabled.

Show add member

UIKitSettings.allowAddMembers = .enabled

You can show it using .enabled or hide it using .disabled.

Allow moderator to delete messages of participants

UIKitSettings.allowModeratorToDeleteMemberMessages = .enabled

You can show it using .enabled or hide it using .disabled.

Allow user to kick members

UIKitSettings.kickMember = .enabled

You can show it using .enabled or hide it using .disabled.

Allow user to ban members

UIKitSettings.banMember = .enabled

You can show it using .enabled or hide it using .disabled.

Allow user to promote or demote members

UIKitSettings.allowPromoteDemoteMembers = .enabled

You can show it using .enabled or hide it using .disabled.

Show action messages for groups.

UIKitSettings.enableActionsForGroupNotifications = .enabled

You can show it using .enabled or hide it using .disabled.

Show public group option for creating groups.

UIKitSettings.publicGroup = .enabled

You can show it using .enabled or hide it using .disabled.

Show private group option for creating groups.

UIKitSettings.privateGroup = .enabled

You can show it using .enabled or hide it using .disabled.

Show password protected group option for creating groups.

UIKitSettings.passwordGroup = .enabled

You can show it using .enabled or hide it using .disabled.

Show search groups

UIKitSettings.searchGroups = .enabled

You can show it using .enabled or hide it using .disabled.

Enable message in private from Groups

UIKitSettings.messageInPrivate = .enabled

You can show it using .enabled or hide it using .disabled.

Enable message receipt information from Groups

UIKitSettings.messageInformation = .enabled

You can show it using .enabled or hide it using .disabled.


7. Message settings

Sr No

Description

Code Snippet

Settings

Show message composer for one-on-one chat

UIKitSettings.sendMessageInOneOnOne = .enabled

You can show it using .enabled or hide it using .disabled.

Show message composer for group chat

UIKitSettings.sendMessageInGroup = .enabled

You can show it using .enabled or hide it using .disabled.

3

Show send text message

UIKitSettings.sendTextMessage = .enabled

You can show it using .enabled or hide it using .disabled.

Show send photos & videos

UIKitSettings.sendPhotoVideos = .enabled

You can show it using .enabled or hide it using .disabled.

Show send files & documents

UIKitSettings.sendFiles = .enabled

You can show it using .enabled or hide it using .disabled.

Show send voice notes

UIKitSettings.sendVoiceNotes = .enabled

You can show it using .enabled or hide it using .disabled.

Show send emojis from keyboard

UIKitSettings.sendEmojis = .enabled

You can show it using .enabled or hide it using .disabled.

Show send emojis in Larger Size

UIKitSettings.sendEmojisInLargerSize = .enabled

You can show it using .enabled or hide it using .disabled.

Show send stickers

UIKitSettings.sendStickers = .enabled

You can show it using .enabled or hide it using .disabled.

Send typing indicator

UIKitSettings.sendTypingIndicator = .enabled

You can show it using .enabled or hide it using .disabled.

Send message reaction

UIKitSettings.sendMessageReaction = .enabled

You can show it using .enabled or hide it using .disabled.

Send live reaction

UIKitSettings.sendLiveReaction = .enabled

You can show it using .enabled or hide it using .disabled.

13..

Ability to edit the message

UIKitSettings.editMessage = .enabled

You can show it using .enabled or hide it using .disabled.

Ability to delete the message

UIKitSettings.deleteMessage = .enabled

You can show it using .enabled or hide it using .disabled.

Ability to share, copy & forward the message

UIKitSettings.shareCopyForwardMessage = .enabled

You can show it using .enabled or hide it using .disabled.

Ability to reply on message

UIKitSettings.replyToMessage = .enabled

You can show it using .enabled or hide it using .disabled.

Ability to start new thread for message

UIKitSettings.threadedChats = .enabled

You can show it using .enabled or hide it using .disabled.

Ability to share live reaction

UIKitSettings.shareLiveReaction = .enabled

You can show it using .enabled or hide it using .disabled.

Ability to share your location

UIKitSettings.shareLocation = .enabled

You can show it using .enabled or hide it using .disabled.

Show shared media

UIKitSettings.viewShareMedia = .enabled

You can show it using .enabled or hide it using .disabled.

Show read/delivery receipts for Messages

UIKitSettings.showReadDeliveryReceipts = .enabled

You can show it using .enabled or hide it using .disabled.

Ability to create poll (Poll Extension must be enabled from Dashboard)

UIKitSettings.polls = .enabled

You can show it using .enabled or hide it using .disabled.

Enable sound for Messages

UIKitSettings.enableSoundForMessages = .enabled

You can show it using .enabled or hide it using .disabled.

Enable Message Reactions

UIKitSettings.messageReaction = .enabled

You can show it using .enabled or hide it using .disabled.

Enable Collaborative Document

UIKitSettings.collaborativeDocument = .enabled

You can show it using .enabled or hide it using .disabled.

Enable Collaborative Whiteboard

UIKitSettings.collaborativeWhiteboard = .enabled

You can show it using .enabled or hide it using .disabled.

Enable Message Translation

UIKitSettings.messageTranslation = .enabled

You can show it using .enabled or hide it using .disabled.

Hide/show delete messages

UIKitSettings.hideDeletedMessages = .enabled

You can show it using .enabled or hide it using .disabled.

Enable Message History

UIKitSettings.messageHistory = .enabled

You can show it using .enabled or hide it using .disabled.

Show smart replies
(Smart Replies Extension must be enabled from Dashboard)

UIKitSettings.smartReplies = .enabled

You can show it using .enabled or hide it using .disabled.



Did this page help you?