Apple Watch SwiftUI layouts

Explore SwiftUI APIs, components, and modifiers with interactive Apple Watch previews, Swift code, and Apple documentation.

@State var selection = "1"
let pickerOptions = ["1", "2", "3"]

var body: some View {
    List {
        Picker("Foo", selection: $selection) {
            ForEach(pickerOptions, id: \.self) { option in
                Text(option)
            }
        }
        Picker("Bar", systemImage: "hand.tap", selection: $selection) {
            ForEach(pickerOptions, id: \.self) { option in
                Text(option)
            }
        }
        Picker("Bar", image: .cats24X24, selection: $selection) {
            ForEach(pickerOptions, id: \.self) { option in
                Text(option)
            }
        }
        Picker(selection: $selection) {
            ForEach(pickerOptions, id: \.self) { option in
                Text(option)
            }
        } label: {
            Label("Foo", systemImage: "star")
            Text("Bar")
        }
    }
}
iOS 13.0+ iPadOS 13.0+ macOS 10.15+ watchOS 6.0+ tvOS 13.0+ visionOS 1.0+

Every available Apple Watch screenshot for Picker.

1 views