These are the lesson notes for this day. Its build-along tutorial and flash cards have not been written yet.
HStack, VStack and ZStack arrange their children in a row, in a column, and back to front. Each takes an alignment (how children line up across the other axis) and a spacing (the gap between them). A Spacer takes up whatever room is left over, pushing its neighbours apart. A stack is only as large as its content needs, unless something inside it is flexible.
This replaces Auto Layout for most screens. Instead of writing constraints between views, you nest stacks. LazyVStack and LazyHStack create their children only as they scroll into view; use them inside a ScrollView when the content is long.
Recreate a boarding pass or a shop receipt using only stacks, spacers and padding. Use no fixed frames, apart from one for an icon.
After this lesson you should be able to answerSpacer decide how much room to take?LazyVStack instead of VStack?