static let cancel: ButtonRole
A role that indicates a button that cancels an operation.
static let destructive: ButtonRole
A role that indicates a destructive button.
Availability 有効性
Technology
struct ButtonRole
A button role provides a description of a button’s purpose. For example, the destructive
role indicates that a button performs a destructive action, like delete user data:
Button("Delete", role: .destructive) { delete() }
static let cancel: ButtonRole
static let destructive: ButtonRole
static func == (ButtonRole , ButtonRole ) -> Bool
static func != (Self, Self) -> Bool
init(role: ButtonRole ?, action: () -> Void, label: () -> Label)
Label
conforms to View
.
Label
がView
に準拠する場合に利用可能です。
init(LocalizedStringKey , role: ButtonRole ?, action: () -> Void)
Label
is Text
.
Label
がText
である時に利用可能です。
init<S>(S, role: ButtonRole ?, action: () -> Void)
Label
is Text
.
Label
がText
である時に利用可能です。