Layout Elements

Hey CodeCrew,

Do you know your basic SwiftUI layout containers?

These are very similar to Stack Views in UIKit.

  • HStack groups and arranges elements horizontally.
  • VStack groups and arranges elements vertically.
  • ZStack groups and arranges elements front to back (Element listed first will be farthest from the user).

In addition to layout containers, my latest SwiftUI video ( also covers some of the basic building block UI elements that we’ll use in the weeks to come:

  • Buttons
  • Text labels
  • Image elements
  • Spacer elements

Next week, we’re going to talk about SwiftUI modifiers!

1 Like