This is Project 4 of 100 days of SwiftUI by Paul Hudson (link here). The app is designed to help coffee drinkers get a good night’s sleep by asking them three questions:
- When do they want to wake up?
- Roughly how many hours of sleep do they want?
- How many cups of coffee do they drink per day?
As with apps from before, there will be some challenges at the end of the tutorial which will be added as separate commits when I implement them.
Challenge 1: Replace each VStack in our form with a Section, where the text view is the title of the section. Do you prefer this layout or the VStack layout? It’s your app – you choose!
Challenge 2: Replace the “Number of cups” stepper with a Picker showing the same range of values.
Challenge 3: Change the user interface so that it always shows their recommended bedtime using a nice and large font. You should be able to remove the “Calculate” button entirely.