Initializer

init(selection:content:label:)

Creates a picker that displays a custom label.

Declaration 宣言

init(selection: Binding<SelectionValue>, content: () -> Content, label: () -> Label)
Available when Label conforms to View, SelectionValue conforms to Hashable, and Content conforms to View.

Parameters パラメータ

selection

A binding to a property that determines the currently-selected option.

content

A view that contains the set of options.

label

A view that describes the purpose of selecting an option.

See Also 参照

Creating a Picker ピッカー(選び出し集)を作成する