Base Components | Description |
---|---|
List Base | This renders common components used across Conversations , Groups & Users . |
View_Controller
file.
pushViewController
function instead of presenting the view controller.OnBackButtonClick
event is typically triggered when the back button is pressed and it carries a default action. However, with the following code snippet, you can effortlessly override this default operation.
setStyle
method.
Property | Description | Code |
---|---|---|
SubtitleText Color | Sets the text color for the subtitle | .set(subtitleTextColor: UIColor) |
SubtitleText Appearance | Sets the text appearance for the subtitle | .set(subtitleTextFont: UIFont) |
Title Font | Sets the font for the title | .set(titleTextFont: UIFont) |
EmptyText Font | Sets the font for the empty state text | setEmptyTextFont(String emptyTextFont) |
Title Color | Sets the text color for the title | .set(titleTextColor: UIColor) |
Background Color | Sets the background color | .set(background: UIColor) |
Corner Radius | Sets the corner radius | set(cornerRadius: CometChatCornerStyle) |
Border Width | Sets the width of the border | .set(borderWidth: CGFloat) |
Border Color | Sets the color of the border | .set(borderColor: UIColor) |
CometChatMessageInformation
is a view controller that can be presented or pushed. CometChatMessageInformation
includes various attributes and methods to customize its UI.
pushViewController
function instead of presenting the view controller.Methods | Parameters | Description |
---|---|---|
titleText | String | used to set title |
backIcon | UIImage | used to set the back icon |
readIcon | UIImage | used to set the read icon |
deliveredIcon | UIImage | used to set the delivered icon |
emptyStateText | String | used to set the empty state text |
emptyStateView | UIView | used to set the empty state view |
loadingIcon | UIImage | used to set the loading icon |
loadingStateView | UIView | used to set the loading state view |
errorStateText | String | used to set the error state text |
errorStateView | UIView | used to set the error state view |
listItemStyle | ListItemStyle | used to set the list item style |
template | CometChatMessageTemplate | used to set the template of the message |
messageInformationStyle | MessageInformationStyle | used to set the message information style |
subtitle | (message: BaseMessage, _ receipt: MessageReceipt) -> UIView | used to set the subtitle view |
bubbleView | (message: BaseMessage) -> UIView | used to set a custom bubble view |
listItemView | (message*: BaseMessage,* receipt: MessageReceipt) -> UIView | used to set a custom listItemView |
onError | (error: CometChatException) -> Void | used to set a callback triggered in case any error happens |
onBack | () -> Void | used to set the back icon function when tapped on back icon |
receiptDatePattern | (_ timestamp: Int?) -> String | used to set the date pattern for delivered and read date time |
Methods | Parameters | Description |
---|---|---|
background | UIColor | Used to set the background color |
cornerRadius | CometChatCornerStyle | used to set the corner radius |
borderWidth | CGFloat | used to set the border width |
borderColor | UIColor | used to set the border color |
width | CGFloat | used to set width |
height | CGFloat | used to set height |
titleTextColor | UIColor | used to set the title text color |
titleTextFont | UIFont | used to set the title text font |
sendIconTint | UIColor | used to set the send icon color |
readIconTint | UIColor | used to set the read icon color |
deliveredIconTint | UIColor | used to set the delivered icon color |
subtitleTextColor | UIColor | used to set the subtitle text color |
subtitleTextFont | UIFont | used to set the subtitle text font |
dividerTint | UIColor | used to set the divider color |
pushViewController
function instead of presenting the view controller.