Contents

CPInformationTemplate

A template that provides information for a point of interest, food order, parking location, or charging location.

Declaration

@MainActor class CPInformationTemplate

Overview

An information template displays a list of items, and up to three actions the user can perform.

You use an information template to display informative, actionable content to the user. For example, you might display a summary of the user’s food order, and provide actions to place or cancel the order.

When creating an information template, you populate the list with an array of CPInformationItem objects, and provide any contextual actions as an array of CPTextButton objects. The template then arranges the list’s items using your choice of layout — see CPInformationTemplateLayout for more information.

To display an information template, call your interface controller’s pushTemplate(_:animated:completion:) method to push it onto the navigation hierarchy, or presentTemplate(_:animated:completion:) to present it modally.

Topics

Creating an Information Template

Accessing the Layout

Managing the Title

Managing the Items

Managing the Actions

See Also

Location and Information