1

So far I've managed to populate a picker with an array and set it to stack style which gives me the display but how can I tap on a row in a picker to select it?

Is there a way to use a button which covers the picker?

Or am I going about this completely wrong?

tony
  • 23
  • 3

1 Answers1

0

To get it close to the Workout app interface, you'll want to use the new SwiftUI framework if you're okay with it being it in beta and with targeting watchOS 6. This is done through a List with the carousel style, which is discussed in the WWDC session SwiftUI on watchOS.

Curiosity
  • 544
  • 1
  • 15
  • 29
  • thanks Austin, I was avoiding SwiftUI but it looks pretty straightforward. Seems odd that something Apple has used in their apps for a while is not available for developers. – tony Jul 15 '19 at 02:18
  • Hi Tony, no problem - it may take some getting used to the declarative model of SwiftUI if you’re just used to the imperative style, but Apple has these nice tutorials you can go through and it’s powerfully concise once you learn it. I think it’s actually common for them to not expose private APIs while they’re testing, which they explained their reasoning for here: https://youtu.be/jd97us27eSg. – Curiosity Jul 15 '19 at 02:57