21.2 Spacers, Alignment and Padding
To add space between views, SwiftUI includes the Spacer component. When used in a stack layout, the spacer will flexibly expand and contract along the axis of the containing stack (in other words either horizontally or vertically) to provide a gap between views positioned on either side, for example:
HStack(alignment: .top) {
Text("Q1 Sales")
.font(.headline)
Spacer()
VStack(alignment: .leading) {
Text("January")
Text("February")
Text("March")
}
Spacer()
.
.
In terms of aligning the content of a stack, this can be achieved by specifying an alignment value...