Contents

default(_:action:)

Creates an alert button with the default style.

Declaration

static func `default`(_ label: Text, action: (() -> Void)? = {}) -> Alert.Button

Parameters

  • label:

    The text to display on the button.

  • action:

    A closure to execute when the user taps or presses the button.

Return Value

An alert button with the default style.

See Also

Getting a button