init(alignment:spacing:)
Creates a vertical stack with the specified spacing and horizontal alignment.
Declaration
init(alignment: HorizontalAlignment = .center, spacing: CGFloat? = nil)Parameters
- alignment:
The guide for aligning the subviews in this stack. It has the same horizontal screen coordinate for all subviews.
- spacing:
The distance between adjacent subviews. Set this value to
nilto use default distances between subviews.