Spacer
public extension Spacer
-
A flexible space that expands along the major axis of its containing stack layout, or on both axes if not contained in a stack.
Use this initializer to create a flexible space that expands to fill any extra space in a stack layout. For example, the following code creates a horizontal stack with a fixed-width button and a flexible space:
HStack { BPKButton("Button") { } Spacer(.md) }
The button is fixed-width, and the space expands to fill any extra space in the horizontal stack.
Declaration
Swift
init(minLength: BPKSpacing)
Parameters
minLength
The minimum length of the space.