Type Method 型メソッド

cancel(_:action:)

Creates an alert button that indicates cancellation, with a custom label.

Declaration 宣言

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

Return Value 戻り値

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

Parameters パラメータ

label

The text to display on the button.

action

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

See Also 参照

Getting a Button ボタンを取得する