spacing
TypeScriptget spacing(): (number) | nullSwift declarationvar spacing: CGFloat?The distance between adjacent subviews. Set this value to `nil` to use default distances between subviews.
struct · iOS 16.0+ · SDK 27.1
@frozen struct VStackLayoutA vertical container that you can use in conditional layouts. This layout container behaves like a ``VStack``, but conforms to the ``Layout`` protocol so you can use it in the conditional layouts that you construct with ``AnyLayout``. If you don't need a conditional layout, use ``VStack`` instead.
get spacing(): (number) | nullSwift declarationvar spacing: CGFloat?The distance between adjacent subviews. Set this value to `nil` to use default distances between subviews.
set spacing(value: (number) | null)Swift declarationvar spacing: CGFloat?The distance between adjacent subviews. Set this value to `nil` to use default distances between subviews.
static init(alignment?: HorizontalAlignment, spacing?: (number) | null): VStackLayoutSwift declarationinit(alignment: HorizontalAlignment = .center, spacing: CGFloat? = nil)Creates a vertical stack with the specified spacing and horizontal alignment. - 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 `nil` to use default distances between subviews.
get alignment(): HorizontalAlignmentSwift declarationvar alignment: HorizontalAlignmentThe horizontal alignment of subviews.
set alignment(value: HorizontalAlignment)Swift declarationvar alignment: HorizontalAlignmentThe horizontal alignment of subviews.
No declarations were skipped in this snapshot.