These technique projects are designed to dive deep into specific SwiftUI topics, and I hope you’ve learned a lot about views and modifiers here – why SwiftUI uses structs for views, why
some View is so useful, how modifier order matters, and much more.
Views and modifiers are the fundamental building blocks of any SwiftUI app, which is why I wanted to focus on them so early in this course. View composition is particularly key, as it allows to build small, reusable views that can be assembled like bricks into larger user interfaces.
Anyone can sit through a tutorial, but it takes actual work to remember what was taught. It’s my job to make sure you take as much from these tutorials as possible, so I’ve prepared a short review to help you check your learning.
One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try extending this app to make sure you fully understand what’s going on:
Imageview used for flags with a new
FlagImage()view that renders one flag image using the specific set of modifiers we had.
Viewextension) that makes a view have a large, blue font suitable for prominent titles in a view.
Hacking with Swift+ subscribers can get a complete video solution for this checkpoint here: Solution to Views and Modifiers. If you don’t already subscribe, you can start a free trial today.
SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!
Link copied to your pasteboard.