Contents

init(alignment:spacing:content:)

Creates a horizontal stack with the given spacing and vertical alignment.

Declaration

init(alignment: VerticalAlignment = .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.