TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Challenge 1 Problem with Selecting Different Measurement Styles

Forums > SwiftUI

Hello guys, i was curious as to how to get the Picker to let me select different measurements? I tried a ForEach and it kind of just broke the code and wouldn't let me pick a different one. I've been slowly chipping away at it and haven't gotten too far with it. The length selection is me just trying to different ways to get it to work. I tried creating an array of different unit outputs, but when I tried id: .self it just gave me the same name. I know that having different Strings in the Text field is why it's not letting me select different ones, but I'm just not sure on how to get the Picker to let me select a different one. Not close to being done, but working on it each day.

Any help is much appreciated, thank you!! https://imgur.com/a/9Gjgxbn

1      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.