Use init(selection:
instead.
Initializerinit(selection:
init(selection:label:content:)
Creates a picker that displays a custom label.
Deprecated 非推奨
Availability 有効性
- iOS 13.0–15.4 Deprecated
- iPadOS 13.0–15.4 Deprecated
- macOS 10.15–12.3 Deprecated
- Mac Catalyst 13.0–15.4 Deprecated
- tvOS 13.0–15.4 Deprecated
- watchOS 6.0–8.5 Deprecated
Technology
- Swift
UI
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.