Going with the sample app on Swift.org, we construct a small activity-suggestion app which helps users decide which sports to play. I feel this tutorial was succinct, which I appreciate.
We built a new app, started tinkering with sizing (Circle) then right away modifying our object by setting the color, padding around & an overlay. We learned about these in Landmarks, however it was not done this quickly. This lesson is much smoother, and there is still more yet:
The tutorial introduces the idea of having ‘cards’ which would highlight the sport on top, text on the bottom, we would cycle through the selection like a rolodex. From here they introduce the @State property wrapper, giving our view struct eyes on this property and to observe it for changes. When this State property updates, so does the view. We also use the State wrapper for the new property id, which allows us to ‘swipe right’ each time we tap the button. The guide also leads us into why we need State, as they kind of share what happens when we try to update a property the view relies on with out making it @State.
I did enjoy this one after feeling as though it was trench warfare in the last set. Don’t get me wrong, SwiftUI Concepts can be fun, yet it feels like that team had a larger budget with less information that stuck to me than this ten-minute tutorial on Swift.org. There are other tutorials on Swift.org, they cover console app, a library, a web service, & embedded app for a microcontroller. Depending how I feel maybe I will check on them once SwiftUI is wrapped. Thank you Swift.org team! 💐