Contents

CPGridTemplate

A template that displays and manages a grid of items.

Declaration

@MainActor class CPGridTemplate

Overview

Use this template to display a grid of items as buttons. When creating the grid template, provide an array of CPGridButton objects. Each button contains a title, an image, and an optional handler that the system invokes after the user taps the button on the CarPlay screen.

When there are more than eight buttons in the array, the template displays only the first eight. When there are more than four buttons, the template balances the display of the buttons betweem two rows.

Topics

Creating a Grid Template

Getting the Grid Title

Getting the Grid Buttons

Instance Methods

Type Properties

See Also

General Purpose Templates