Initializer

init(alignment:spacing:content:)

Creates an instance with the given spacing and Y axis alignment.

Declaration

init(alignment: VerticalAlignment = .center, spacing: CGFloat? = nil, @ViewBuilder content: () -> Content)

Parameters

alignment

the guide that will have the same horizontal screen coordinate for all children.

spacing

the distance between adjacent children, or nil if the stack should choose a default distance for each pair of children.

See Also

Creating a Stack

struct VerticalAlignment

An alignment position along the horizontal axis