Contents

init(title:message:primaryButton:secondaryButton:)

Creates an alert with two buttons.

Declaration

init(title: Text, message: Text? = nil, primaryButton: Alert.Button, secondaryButton: Alert.Button)

Parameters

  • title:

    The title of the alert.

  • message:

    The message to display in the body of the alert.

  • primaryButton:

    The first button to show in the alert.

  • secondaryButton:

    The second button to show in the alert.

Discussion

The system determines the visual ordering of the buttons.

See Also

Creating an alert