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 HStackLayoutA horizontal container that you can use in conditional layouts. This layout container behaves like an ``HStack``, 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 ``HStack`` 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?: VerticalAlignment, spacing?: (number) | null): HStackLayoutSwift declarationinit(alignment: VerticalAlignment = .center, spacing: CGFloat? = nil)Creates a horizontal stack with the specified spacing and vertical alignment. - Parameters: - alignment: The guide for aligning the subviews in this stack. It has the same vertical screen coordinate for all subviews. - spacing: The distance between adjacent subviews. Set this value to `nil` to use default distances between subviews.
get alignment(): VerticalAlignmentSwift declarationvar alignment: VerticalAlignmentThe vertical alignment of subviews.
set alignment(value: VerticalAlignment)Swift declarationvar alignment: VerticalAlignmentThe vertical alignment of subviews.
No declarations were skipped in this snapshot.