Spacer, Padding and Frame Modifiers
Using Spacer for flexible gaps and frame to set explicit sizes.
Welcome
`Spacer`, `.padding()`, and `.frame()` are the primary tools for controlling spacing and sizing in SwiftUI. Let's master each.
Spacer — Flexible Space
```swift
HStack {
Text("Left")
Spacer() // fills all available space
Text("Right")
}
```
`Spacer` expands to fill remaining space along the stack axis.
All lessons in this course
- VStack, HStack and ZStack Fundamentals
- LazyVGrid and LazyHGrid
- Spacer, Padding and Frame Modifiers
- GeometryReader for Adaptive Layouts