LegacySingleChildLayout

public protocol LegacySingleChildLayout
  • Computes the size that this layout requires

    Declaration

    Swift

    func measure(in constraint: SizeConstraint, child: Measurable) -> CGSize

    Parameters

    constraint

    The size constraint in which measuring should occur.

    child

    A Measurable representing the single child of this layout.

    Return Value

    The measured size.

  • Generates layout attributes for the child.

    Declaration

    Swift

    func layout(size: CGSize, child: Measurable) -> LayoutAttributes

    Parameters

    size

    The size that layout attributes should be generated within.

    child

    A Measurable representing the single child of this layout.

    Return Value

    Layout attributes for the child of this layout.