Row

public struct Row : StackElement

Displays a list of items in a linear horizontal layout.

  • Describes how the row’s children will be vertically aligned.

    See more

    Declaration

    Swift

    public enum RowAlignment : Equatable
  • Declaration

    Swift

    public var children: [(element: Element, traits: StackLayout.Traits, key: AnyHashable?)]
  • Declaration

    Swift

    public private(set) var layout: StackLayout { get }
  • Declaration

    Swift

    public init()
  • Initializer using result builder to declaratively build up a stack.

    Note

    If element is a plain Element, then that Element will be implicitly converted into a StackLayout.Child with default values

    Declaration

    Swift

    public init(
        alignment: RowAlignment = .top,
        underflow: StackLayout.UnderflowDistribution = .spaceEvenly,
        overflow: StackLayout.OverflowDistribution = .condenseProportionally,
        minimumSpacing: CGFloat = 0,
        @ElementBuilder<StackLayout.Child> elements: () -> [StackLayout.Child]
    )

    Parameters

    alignment

    Specifies how children will be aligned vertically. Default: .top

    underflow

    Determines the layout when there is extra free space available. Default: .spaceEvenly

    overflow

    Determines the layout when there is not enough space to fit all children as measured. Default: .condenseProportionally

    minimumSpacing

    Spacing in between elements. Default: 0

    elements

    A block containing all elements to be included in the stack.

  • Declaration

    Swift

    public var horizontalUnderflow: StackLayout.UnderflowDistribution { get set }
  • Declaration

    Swift

    public var horizontalOverflow: StackLayout.OverflowDistribution { get set }
  • Specifies how children will be aligned vertically.

    Declaration

    Swift

    public var verticalAlignment: RowAlignment { get set }
  • Declaration

    Swift

    public var minimumHorizontalSpacing: CGFloat { get set }