Class

CPGridTemplate

A template that displays a grid of items.

Declaration

@interface CPGridTemplate : CPTemplate

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

- initWithTitle:gridButtons:

Initializes a grid template with a title and a set of buttons.

CPGridButton

A menu item button displayed on a grid template.

Getting the Grid Title

title

The title shown in the grid template's navigation bar.

Getting the Grid Buttons

gridButtons

The array of grid buttons displayed on the template.

Relationships

Inherits From

See Also

User Interface Basics

CPInterfaceController

A controller that manages the templates that provide the user interface for your app on the CarPlay screen.

CPMapTemplate

A template that provides a navigation bar and map buttons allowing users to interact with your app.

CPListTemplate

A template that displays a hierarchical list of items.

CPTemplate

An abstract base class for interface templates.

CPImageSet

Light and dark representations of an image.