Type Safely

Type Safely

Create Space Between SwiftUI Views Without Using a Spacer

Daily Coding Tip 099

Millie Sturgeon's avatar
Millie Sturgeon
Jun 05, 2022
∙ Paid
Image by Francesco Cirelli from Pixabay

It’s hard to break a habit like putting a Spacer in the middle of a VStack or an HStack, adding space between two items at either end of the stack.

There is no need for this in many cases, as alignment can be used to place items in the stack independently of one another.

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture