StackLayout
public struct StackLayout : Layout
A layout implementation that linearly lays out an array of children along either the horizontal or vertical axis.
-
The default traits for a child contained within a stack layout
Declaration
Swift
public static var defaultTraits: Traits { get }
-
Determines how a stack child will be aligned on the cross axis relative to other children.
See moreDeclaration
Swift
public struct AlignmentGuide
-
Contains traits that affect the layout of individual children in the stack.
See
StackElement.add(...)
for details.In Xcode
See moreDeclaration
Swift
public struct Traits
-
Declaration
Swift
public var axis: Axis
-
Declaration
Swift
public var underflow: StackLayout.UnderflowDistribution
-
Declaration
Swift
public var overflow: StackLayout.OverflowDistribution
-
Declaration
Swift
public var alignment: Alignment
-
Declaration
Swift
public var minimumSpacing: CGFloat
-
Declaration
Swift
public func measure(in constraint: SizeConstraint, items: [(traits: Traits, content: Measurable)]) -> CGSize
-
Declaration
Swift
public func layout(size: CGSize, items: [(traits: Traits, content: Measurable)]) -> [LayoutAttributes]
-
The direction of the stack.
See moreDeclaration
Swift
public enum Axis
-
Determines the on-axis layout when there is extra free space available.
See moreDeclaration
Swift
public enum UnderflowDistribution
-
Determines the on-axis layout when there is not enough space to fit all children as measured.
See moreDeclaration
Swift
public enum OverflowDistribution
-
Determines the cross-axis layout (height for a horizontal stack, width for a vertical stack).
See moreDeclaration
Swift
public enum Alignment
-
Declaration
Swift
public func sizeThatFits( proposal: SizeConstraint, subelements: Subelements, environment: Environment, cache: inout () ) -> CGSize
-
Declaration
Swift
public func placeSubelements( in size: CGSize, subelements: Subelements, environment: Environment, cache: inout () )
-
Declaration