CometChatListItem
contains one to three lines of text optionally flanked by icons or other views, such as CometChatAvatar
, CometChatDate
or Text
. CometChatAvatar
will always be shown in the leading view therefore either one among the avatarURL
or avatarName
must be provided. The icons (or other widgets) for the list item are defined with the tailView
parameter. The first line of text is optional and is specified with title
. The value of subtitle is also optional, will occupy the space allocated for an additional line of text or some other view.
Method | Description |
---|---|
set(avatarURL: String) | Sets the avatarURL to display image |
set(avatarName: String) | Sets the avatar name to show initials |
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 |
StatusIndicatorStyle
.
Method | Description |
---|---|
set(statusIndicatorIcon: UIImage) | Sets the icon for status indicator in list item |
hide(statusIndicator: Bool) | Hide/shows the status indicator in list item |
set(background: UIColor) | Sets the background color for status indicator in list item |
set(cornerRadius: CometChatCornerStyle) | Sets the corner radius for status indicator in list item |
set(borderWidth: CGFloat) | Sets the border width for status indicator in list item |
set(borderColor: UIColor) | Sets the border color for status indicator in list item |
ListItem
. You can modify the background using the below methods:
Method | Description |
---|---|
set(background: [UIColor]) | Sets the title font for ConversationListItem |
UILabel
which specifies a title for ListItem
. You can modify the title using the below methods:
Method | Description |
---|---|
set(title: String) | Sets the title for list item . |
ListItem
. You can modify the title using the below methods:
Method | Description |
---|---|
set(subtitle: UIView) | Sets the subtitle view for ListItem . |
ListItem
. You can modify the title using the below methods:
Method | Description |
---|---|
set(tail: UIView) | Sets the tail view for ListItem . |
ListItem
. You can modify the title using the below methods:
Method | Description |
---|---|
set(customView: UIView) | Sets the custom view for ListItem . |
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 |
set(titleColor: UIColor) | Sets the title color for ListItem |
set(titleFont: UIFont) | Sets the title font for ListItem |
Method | Description |
---|---|
allow(selection: Bool) | Sets the selection mode for ListItem . |