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.
Methods
Set Avatar
- Swift
Set Avatar Style
User can style the avatar component in list item with the help of properties provided by theAvatarStyle.
- Swift
Set StatusIndicator Style
User can style the status indicator component in list item with the help of properties provided by theStatusIndicatorStyle.
- Swift
Background
The background is a UIView which is present in the backdrop forListItem. You can modify the background using the below methods:
- Swift
Set Title
The title is aUILabel which specifies a title for ListItem. You can modify the title using the below methods:
- Swift
Set Subtitle View
The SubTitleView is a UIView that specifies a subTitle forListItem. You can modify the title using the below methods:
- Swift
Set Tail View
The TailView is a UIView that specifies a tail forListItem. You can modify the title using the below methods:
- Swift
Set Custom View
The custom view is a UIView that specifies a tail forListItem. You can modify the title using the below methods:
- Swift
Set ListItem Style
User can style the list item with the help of properties provided by the ListItemStyle.- Swift
Allow Selection
This enables the selection mode for list item- Swift