Skip to main content
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


Set Avatar Style

User can style the avatar component in list item with the help of properties provided by the AvatarStyle.

Set StatusIndicator Style

User can style the status indicator component in list item with the help of properties provided by the StatusIndicatorStyle.

Background

The background is a UIView which is present in the backdrop for ListItem. You can modify the background using the below methods:

Set Title

The title is a UILabel which specifies a title for ListItem. You can modify the title using the below methods:

Set Subtitle View

The SubTitleView is a UIView that specifies a subTitle for ListItem. You can modify the title using the below methods:

Set Tail View

The TailView is a UIView that specifies a tail for ListItem. You can modify the title using the below methods:

Set Custom View

The custom view is a UIView that specifies a tail for ListItem. You can modify the title using the below methods:

Set ListItem Style

User can style the list item with the help of properties provided by the ListItemStyle.

Allow Selection

This enables the selection mode for list item