Action

struct Action

The action button on the bottom of an alert view.

  • Undocumented

    Declaration

    Swift

    public init(@ViewBuilder label: () -> some View, didSelect: (() -> Void)? = nil)
  • Undocumented

    Declaration

    Swift

    public init(label: Text, didSelect: (() -> Void)? = nil)
  • Creates an alert action object.

    Declaration

    Swift

    public init(label: String, didSelect: (() -> Void)? = nil)

    Parameters

    label

    A string that describes the purpose of the action.

    didSelect

    The closure to be called when a user triggers the action.