Contents

init(alignment:spacing:content:)

Creates an instance with the given spacing and horizontal alignment.

Declaration

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

Parameters

  • alignment:

    The guide for aligning the subviews in this stack. This guide has the same vertical screen coordinate for every subview.

  • spacing:

    The distance between adjacent subviews, or nil if you want the stack to choose a default distance for each pair of subviews.

  • content:

    A view builder that creates the content of this stack.