Stage 2 · Lesson 1 of 10
Views as structs
In a view is a that conforms to the View protocol. It has a body property describing its content. Views are cheap values, created and thrown away constantly.
SwiftUI compares them and updates only what changed on screen. This is declarative UI. You build screens by combining small views.
So a ProductRow is an image, a of text and a price, and a list screen uses ProductRow for each item. Pull out a subview as soon as a body grows past a screenful. Because views are , they fit the structs you learnt in .
Common traptreating a view like a UIKit object that you keep a reference to and change later.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeSwiftUI Tutorials (Apple)
Apple · Beginner
Apple's own path from views and stacks to lists and navigation
- CourseFree100 Days of SwiftUI
Paul Hudson (Hacking with Swift) · Beginner
Days 16 to 35 build six small apps on views, modifiers, lists and animation