Spacer inside a VStack will probably take all space vertically, but no space horizontally.
There are cases (e.g. ) when the behavior in one axis will be affected by the other.
Frame Behaviors
pull-in views:
only take as much space as needed, e.g. HStack/VStack.
adaptivepull-in views:
take only what they need, if offered is not enough, they'll do their best (truncate or wrap) to respect the offered space, e.g. .
push-out views:
take all the space offered, e.g. Rectangle.
Custom views:
draw outside the area offered.
SwiftUI ⟩ ⟩
, - fixed ideal size.
SwiftUI Lab ⟩
Sarun ⟩ ⭐️ -
can be used to align . 👉 See:
can use to test frame behaviors.
convenience extensions:
can use ( extension) to show a view's frame visually.