PickerWithWheelStyleType
@MainActor
public struct PickerWithWheelStyleType : IntrospectableViewType
An abstract representation of the Picker
type in SwiftUI, with .wheel
style.
struct ContentView: View {
@State var selection = "1"
var body: some View {
Picker("Pick a number", selection: $selection) {
Text("1").tag("1")
Text("2").tag("2")
Text("3").tag("3")
}
.pickerStyle(.wheel)
.introspect(.picker(style: .wheel), on: .iOS(.all)) {
print(type(of: $0)) // UIPickerView
}
}
}