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
labelA string that describes the purpose of the action.
didSelectThe closure to be called when a user triggers the action.