0Pricing
SwiftUI Academy · Lesson

Layering with ZStack

Overlap views back to front for depth.

Stacking in Depth

VStack goes down and HStack goes across, but sometimes you want views to overlap. That calls for a stack that works in depth. 🧱

Meet ZStack

A ZStack layers its children back to front, like sheets of glass piled on top of each other. Later views sit above earlier ones.

All lessons in this course

  1. Stacking Views Vertically
  2. Rows with HStack
  3. Layering with ZStack
  4. Spacing & Alignment in Stacks
← Back to SwiftUI Academy