cancel(_:)
Creates an alert button that indicates cancellation, with a system-provided label.
Declaration
static func cancel(_ action: (() -> Void)? = {}) -> Alert.ButtonParameters
- action:
A closure to execute when the user taps or presses the button.
Return Value
An alert button that indicates cancellation.
Discussion
The system automatically chooses locale-appropriate text for the button’s label.