0

On watchOS you have the curvesAtBottom and curvesAtTop https://developer.apple.com/documentation/watchkit/wkinterfacetable/3042495-curvesatbottom It allow to have rescale on elements on top and bottom of a view on a WKInterfaceTable image

I can't find an equivalent on SwiftUI

grougrou
  • 1
  • 2

1 Answers1

0

It looks like curvesAtBottom is a feature in SwiftUI for watchOS 5.1+ only. The closest I think you'll get without building your own component, is PickerStyle.wheel.

example:

enum Flavor: String, CaseIterable, Identifiable {
    case chocolate, vanilla, strawberry
    var id: Self { self }
}

struct MyTestView1: View {
    @State private var selectedFlavor: Flavor = .chocolate

    var body: some View {
        List {
            Picker("Flavor", selection: $selectedFlavor) {
                Text("Chocolate").tag(Flavor.chocolate)
                Text("Vanilla").tag(Flavor.vanilla)
                Text("Strawberry").tag(Flavor.strawberry)
            }
        }.pickerStyle(.wheel)
    }
}

PickerStyle Wheel example screenshot

Fraune
  • 74
  • 4
  • Unfortunately its not a swiftUI feature but a swiftLang feature which work with WkTableView. Moreover swift lang is not recommanded on watchOS since Xcode 14 – grougrou Nov 21 '22 at 20:20