Initializer

init(isOn:label:)

Creates a toggle that displays a custom label.

Declaration 宣言

init(isOn: Binding<Bool>, label: () -> Label)

Parameters パラメータ

isOn

A binding to a property that determines whether the toggle is on or off.

label

A view that describes the purpose of the toggle.

See Also 参照

Creating a Toggle トグルを作成する