Class

CPAlertTemplate

A template for displaying alerts on the CarPlay screen.

Declaration

class CPAlertTemplate : CPTemplate

Overview

You must present alerts modally by calling the presentTemplate(_:animated:) method available on your app’s instance of CPInterfaceController. The user dismisses the alert by pressing a button, or you can dismiss it by calling the interface controller’s dismissTemplate(animated:) method.

Topics

Creating an Alert Template

Getting the Alert Information

var titleVariants: [String]

The array of title variants.

var actions: [CPAlertAction]

The array of actions available on the alert.

Relationships

Inherits From

Conforms To

See Also

Action Sheets and Alerts

class CPActionSheetTemplate

A template for displaying an action sheet on the CarPlay screen.

class CPAlertAction

An action displayed on an alert as a button.