Challenge day with the app today. First two parts (changing VStack to Section and Stepper to Picker) were pretty straightforward, at least when I snuck a peak at some code and documentation. The third part, about taking the recommended bed time out of the alert and displaying it with large text was pretty easy as well. The part that confused me was this statement:
You should be able to remove the “Calculate” button entirely.
https://www.hackingwithswift.com/books/ios-swiftui/betterrest-wrap-up
I spent far too long unsuccessfully trying to work out some sort of SwiftUI approach to onChange or an action for the pickers that would update the recommendation once any of the user’s data had changed. At least I think that’s what I’m being asked to do.
I know what I want to do, I just don’t know how to do it. Frustrating.
This is one of those things that I’m hoping I can come back to in a few weeks and feel wise for knowing how to do then what I don’t know now.