TabsPickerStyle
A picker style that presents options as segmented tabs. On macOS, this style produces a segmented picker with a visual treatment that distinguishes tab navigation from value selection. On iOS, tvOS, and visionOS, the visual appearance matches that of the standard standard .segmented style. On all supported platforms, VoiceOver announces options as tabs.
Platform Compatibility
Tags
SwiftUI Code
Picker("Foo", selection: $selection) {
Text("1")
.tag("1")
Section("Bar") {
Text("2")
.tag("2")
}
Text("3")
.tag("3")
}
.pickerStyle(.tabs)