pushViewController
method instead of presenting the view controller.setOnItemClick
is triggered when you click on a ListItem of the Conversations component. This setOnItemClick
method proves beneficial when a user intends to customize the on-click behavior in CometChatConversations.
setOnBack
method becomes valuable when a user needs to override the action triggered upon pressing the back button in CometChatConversations.
selectionMode
feature enables selection with modes: .single and .multiple.
The setOnSelection
event is triggered upon the completion of a selection in SelectionMode
. This returns the selected conversations list when the callback is triggered. It can be executed with any button or action.
ConversationsRequestBuilder
in the Conversations Component to filter the conversation list. You can modify the builder as per your specific requirements with multiple options available to know more refer to ConversationRequestBuilder.
You can set filters using the following parameters.
User
or Groups
Tag
Tag
Tag
pushViewController
method instead of presenting the view controller.Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
ConversationsStyle
to the Conversations
Component to customize the styling.
Property | Description | Code |
---|---|---|
Background Color | Used to set the background color | set(background: UIColor) |
Border Width | Used to set border width | set(borderWidth: CGFloat) |
Border Color | Used to set border color | .set(borderColor: .clear) |
Corner Radius | Used to set border radius | set(cornerRadius: CometChatCornerStyle) |
Title Appearance | Used to customise the appearance of the title in the app bar | set(titleFont: UIFont) |
BackIcon Tint | Used to set the color of the back icon in the app bar | set(backButtonTint: UIColor) |
StatusIndicator Style | Used to set the style of the status indicator shown if a member is online | set(statusIndicatorStyle: StatusIndicatorStyle) |
Avatar
component in the Conversations
Component, you can use the following code snippet. For more information, visit Avatar Styles.
Conversations
Component, you can use the following code snippet. For more information, visit Indicator Styles.
Date
component in the Conversations
Component, you can use the following code snippet. For more information, visit Date Styles.
Badge
component in the Conversations
Component, you can use the following code snippet. For more information, visit Badge Styles
ListItemStyle
component in the Conversations
Component, you can use the following code snippet. For more information, visit List Item Styles.
Property | Description | Code |
---|---|---|
Title | Used to set custom title in the app bar. | .setTitle("Your Custom Title") |
Selection Mode | Used to set a custom text response when fetching the conversations has returned an empty list | selectionMode(mode: SelectionMode) |
ProtectedGroup Icon | Used to set icon shown in place of status indicator for password protected group | .set(protectedGroupIcon: UIImage) |
Sent Icon | Used to customize the receipt icon shown in the subtitle of the conversation item if hideReceipt is false and if the status of the last message in the conversation is sent | .set(sentIcon: UIImage) |
Delivered Icon | Used to customize the receipt icon shown in the subtitle of the conversation item if hideReceipt is false and if the status of the last message in the conversation is delivered | .set(deliveredIcon: UIImage) |
Read Icon | Used to customize the receipt icon shown in the subtitle of the conversation item if hideReceipt is false and if the status of the last message in the conversation is read | .set(readIcon: UIImage) |
Back Icon | used to set back button located in the app bar | .set(backButtonIcon: UIImage) |
Show BackButton | Used to toggle visibility for back button in the app | .show(backButton: Bool) |
Hide Error | Used to hide error on fetching conversations | .hide(error: Bool) |
Hide Separator | Used to control visibility of Separators in the list view | .hide(separator: Bool) |
Disable UsersPresence | Used to control visibility of status indicator shown if user is online | .disable(userPresence: Bool) |
Hide Receipt | Used to hide message receipts shown in the subtitle of the conversation item. | .hide(receipt: Bool) |
Disable Typing | Used to toggle visibility of typing indicator | .disable(typing: Bool) |
CustomListItemView
as a custom UIView
. Which we will inflate in setListItemView()
[UIBarButtonItem]( )
objects. This array will be inflated and then passed to the .setMenu
.
SubtitleView
a custom UIView
cocoa touch file
and inflate it in the setSubtitleView apply function. Then, you can define individual actions depending on your requirements.
SubtitleView
file should should appear as follows:ErrorStateView
using setEmptyStateView
to match the error view of your app.
errorView
. You can choose any view you prefer. This view should be inflated and passed to the setErrorView()
method.