CometChatMessageBubble
is the reusable component which forms different types of message bubbles accordingly.
CometChatMessageBubble
contains below component in it.
UIImageView
that specifies an avatar for MessageBubble
. You can modify the title using the below methods:
Method | Description |
---|---|
set(avatarName: String) | Sets the avatar initials for MessageBubble . |
set(avatarURL: String) | Sets the avatar image with given URL for MessageBubble . |
set(avatarStyle: AvatarStyle) | styles the avatar in MessageBubble |
hide(leadingView: Bool) | Hide/shows the avatar in MessageBubble |
AvatarStyle
.
Method | Description |
---|---|
set(background: UIColor) | Sets the background color for Avatar |
set(cornerRadius: CometChatCornerStyle) | Sets the corner radius for Avatar |
set(borderWidth: CGFloat) | Sets the border width for Avatar |
set(borderColor: UIColor) | Sets the border color for Avatar |
set(textFont: UIFont) | Sets the text font for Avatar |
set(textColor: UIColor) | Sets the text color for Avatar |
set(outerViewWidth: CGFloat) | Sets the outerView width for Avatar |
set(outerViewSpacing: CGFloat) | Sets the outerView spacing for Avatar |
MessageBubble
is presented.
Method | Description |
---|---|
set(controller: UIViewController) | This method will set the instance of the view controller from which the MessageBubble is presented. |
MessageBubble .
**This will take the MessageBubbleAlignment as a enum and render the alignment of the MessageBubble.
MessageBubbleAlignment has two cases:
1. Left
2. Right
Method | Description |
---|---|
set(bubbleAlignment: MessageBubbleAlignment) | This method will set the alignment for the **MessageBubble . **This will take the MessageBubbleAlignment as a enum and render the alignment of the MessageBubble. MessageBubbleAlignment has two cases: .left, .right |
Method | Description |
---|---|
set(headerView: UIStackView) | This will set the header view in the MessageBubble |
hide(headerView: Bool) | This will hide/show the header view in the MessageBubble |
set(footerView: UIStackView) | This will set the footer view in the MessageBubble |
hide(footerView: Bool) | This will hide/show the header view in the MessageBubble |
set(bubbleView: UIStackView?) | This will set the bubble view in the MessageBubble |
set(replyView: UIStackView) | This will set the reply view in the MessageBubble |
MessageBubble
with the help of properties provided by the MessageBubbleStyle
.
Method | Description |
---|---|
set(background: UIColor) | Sets the background color for ListItem |
set(cornerRadius: CometChatCornerStyle) | Sets the corner radius for ListItem |
set(borderWidth: CGFloat) | Sets the border width for ListItem |
set(borderColor: UIColor) | Sets the border color for ListItem |