CPMessageListItem
A list template row that represents a conversation or contact.
Declaration
class CPMessageListItemOverview
Use CPMessageListItem to display information about a conversation or a contact in a list template. Unlike CPListItem, you don’t provide a selection handler. Instead, when the user selects the row, CarPlay invokes Siri using the parameters you provide and begins a message compose, read, or reply flow.
The behavior of the list item when the user selects it depends on how you initialize or configure it. If the item has a phone number or email address, Siri launches the message compose flow. If the list item has an unread indicator, Siri launches the message read flow. Otherwise, Siri launches the message reply flow.
CPMessageListItem can display various auxiliary items in its leading and trailing regions. You describe these using a configuration object for each region. See leadingConfiguration and trailingConfiguration for more information.
CarPlay doesn’t support custom list item types. Instead, use the userInfo property to attach a value to the list item that provides additional context, such as specifying a model object that corresponds to the item.
Topics
Creating a Message List Item
init(conversationIdentifier:text:leadingConfiguration:trailingConfiguration:detailText:trailingText:)init(fullName:phoneOrEmailAddress:leadingConfiguration:trailingConfiguration:detailText:trailingText:)
Managing the Message Context
Managing Content
Managing Leading and Trailing Configurations
leadingConfigurationCPMessageListItemLeadingConfigurationtrailingConfigurationCPMessageListItemTrailingConfiguration