Initializer

init(selection:label:content:)

Creates a picker that displays a custom label.

Declaration 宣言

init(selection: Binding<SelectionValue>, label: Label, content: () -> Content)
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.

label

A view that describes the purpose of selecting an option.

content

A view that contains the set of options.