Type Method 型メソッド

cancel(_:)

Creates an alert button that indicates cancellation, with a system-provided label.

Declaration 宣言

static func cancel(_ action: (() -> Void)? = {}) -> Alert.Button

Return Value 戻り値

An alert button that indicates cancellation. 取り消しを指し示すアラートボタン。

Parameters パラメータ

action

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

Discussion 議論

The system automatically chooses locale-appropriate text for the button’s label.

See Also 参照

Getting a Button ボタンを取得する