Initializer

init(titleVariants:actions:)

Creates an alert template.

Declaration

init(titleVariants: [String], actions: [CPAlertAction])

Parameters

titleVariants

An array of title variants. Each title should be localized and ready for display to the user. When the system displays the alert, it selects the title that best fits the available screen space, so arrange the variants from most to least preferred. Always include at least one title in the array.

actions

An array of actions available on the alert. The array must contain at least one action.

Return Value

A newly initialized alert template.