Picker
public struct Picker : View
extension Picker: Renderable
A view that displays a list of values, from which one can be selected.
By Default a picker view style will be used. If you want to use a different
style, modify the view with the .pickerStyle(_)
method.
-
Declaration
Swift
public var viewStore: ViewValues
-
Declaration
Swift
public var body: View { get }
-
Initializes a picker with a selected index and content. The title is onlt to identify the picker but won’t be visible.
Declaration
Swift
public init(_ title: String, selection: Binding<Int>, @ViewBuilder content: () -> View)
-
Sets the picker style. By setting nil or not setting it, the picker will use the default view style.
Declaration
Swift
public func pickerStyle(_ style: PickerStyle?) -> Picker
-
Declaration
Swift
public func createView(context: Context) -> UIView
-
Declaration
Swift
public func updateView(_ view: UIView, context: Context)