Functions

The following functions are available globally.

  • Constrains the object’s leading edge to be greater than or equal to the leading edge of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromLeadingEdgeOf itemB: Any?,
                     times multiplier: CGFloat = 1.0, offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s trailing edge to be greater than or equal to the leading edge of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromTrailingEdgeOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailing edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top edge to be greater than or equal to the top edge of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromTopEdgeOf itemB: Any?,
                     times multiplier: CGFloat = 1.0, offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s bottom edge to be greater than or equal to the bottom edge of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromBottomEdgeOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to bottom edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top & bottom edges to be greater than or equal to the top & bottom edge of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromHorizontalEdgesOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top & bottom edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading & trailing edges to be greater than or equal to the leading & trailing edge of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromVerticalEdgesOf itemB: Any?,
                     times multiplier: CGFloat = 1.0, offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading & trailing edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top, bottom, leading & trailing edges to be greater than or equal to the top, bottom, leading & trailing edge of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromEdgesOf itemB: Any?,
                     times multiplier: CGFloat = 1.0, offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top, bottom, leading & trailing edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading, top, and bottom edges to be equal to the leadingMargin, topMargin, and bottomMargin edges of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byLeadingMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leadingMargin, topMargin, and bottomMargin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s trailing, top, and bottom edges to be equal to the trailingMargin, topMargin, and bottomMargin of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byTrailingMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailingMargin, topMargin, and bottomMargin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s leading, top, and trailing edges to be equal to the leadingMargin, topMargin, and trailingMargin edges of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byTopMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leadingMargin, topMargin, and trailingMargin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s leading, bottom, and trailing edges to be equal to the leadingMargin, bottomMargin, and trailingMargin of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byBottomMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leadingMargin, bottomMargin, and trailingMargin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s leading edge to the leading margin of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withLeadingMarginOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading margin of the item prior to the inset being applied.

    inset

    The amount to inset the object from the leading margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s trailing edge to the trailing margin of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withTrailingMarginOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailing margin of the item prior to the inset being applied.

    inset

    The amount to inset the object from the trailing margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top edge to the top margin of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withTopMarginOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top margin of the item prior to the inset being applied.

    inset

    The amount to inset the object from the top margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s bottom edge to the bottom margin of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withBottomMarginOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to bottom margin of the item prior to the inset being applied.

    inset

    The amount to inset the object from the bottom margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top & bottom edge to the top & bottom margins of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withVerticalMarginsOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top & bottom margins of the item prior to the inset being applied.

    inset

    The amount to inset the object from the top & bottom margins of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading & trailing edge to the leading & trailing margins of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withHorizontalMarginsOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading & trailing margins of the item prior to the inset being applied.

    inset

    The amount to inset the object from the leading & trailing margins of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading, trailing, top, & bottom edge to the leading, trailing, top & bottom margins of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withMarginsOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading, trailing, top & bottom margins of the item prior to the inset being applied.

    inset

    The amount to inset the object from the leading, trailing, top and bottom margins of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading edge to be greater than or equal to the leading margin of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromLeadingMarginOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s trailing edge to be greater than or equal to the leading margin of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromTrailingMarginOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailing margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top edge to be greater than or equal to the top margin of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromTopMarginOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s bottom edge to be greater than or equal to the bottom margin of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromBottomMarginOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to bottom margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top & bottom edges to be greater than or equal to the top & bottom margin of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromHorizontalMarginsOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top & bottom margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading & trailing edges to be greater than or equal to the leading & trailing margin of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromVerticalMarginsOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading & trailing margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top, bottom, leading & trailing edges to be greater than or equal to the top, bottom, leading & trailing margin of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromMarginsOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    constant

    The amount to add to the constraint equation after the multiplier.

    multiplier

    The ratio altering the constraint relative to top, bottom, leading & trailing margin of the item prior to the constant being applied.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s width to be greater than or equal to the width of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromWidthOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy constant: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to width of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s height to be greater than or equal to the height of item

    Declaration

    Swift

    @discardableResult
    public func expand(_ itemA: Constraid.View, fromHeightOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy constant: CGFloat = 0.0,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to height of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s center to the vertical center of item

    Declaration

    Swift

    @discardableResult
    public func center(_ itemA: Constraid.View, verticallyWithin itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     offsetDirection direction: Constraid.VerticalOffsetDirection = .down,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to center of the item prior to the offset being applied.

    offset

    The amount to offset the object vertically from the center of the item

    direction

    The vertical direction (.up|.down) to offset the object

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s center to the horizontal center of item

    Declaration

    Swift

    @discardableResult
    public func center(_ itemA: Constraid.View, horizontallyWithin itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     offsetDirection direction: Constraid.HorizontalOffsetDirection = .right,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to center of the item prior to the offset being applied.

    offset

    The amount to offset the object horizontally from the center of the item

    direction

    The horizontal direction (.right|.left) to offset the object

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s center to the vertical & horizontal center of item

    Declaration

    Swift

    @discardableResult
    public func center(_ itemA: Constraid.View, within itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     offsetDirection direction: Constraid.OffsetDirection = .downAndRight,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to center of the item prior to the offset being applied.

    offset

    The amount to offset the object vertically & horizontally from the center of the item

    direction

    The direction (.downAndright|.upAndleft) to offset the object

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s leading edge to the trailing margin of item

    Declaration

    Swift

    @discardableResult
    public func follow(theTrailingMarginOf itemB: Any?,
                      with itemA: Constraid.View,
                      times multiplier: CGFloat = 1.0,
                      by constant: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the trailing margin of the item prior to the constant being applied

    constant

    The amount to offset the object’s leading edge from the trailing margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s trailing edge to the leading margin of item

    Declaration

    Swift

    @discardableResult
    public func precede(theLeadingMarginOf itemB: Any?,
                       with itemA: Constraid.View,
                       times multiplier: CGFloat = 1.0,
                       by constant: CGFloat = 0.0,
                       priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the leading margin of the item prior to the constant being applied

    constant

    The amount to offset the object’s trailing edge from the leading margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s bottom edge to the top margin of item

    Declaration

    Swift

    @discardableResult
    public func set(_ itemA: Constraid.View, aboveTheTopMarginOf itemB: Any?,
                   times multiplier: CGFloat = 1.0,
                   by constant: CGFloat = 0.0,
                   priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the top margin of the item prior to the constant being applied

    constant

    The amount to offset the object’s bottom edge from the top margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s top edge to the bottom margin of item

    Declaration

    Swift

    @discardableResult
    public func set(_ itemA: Constraid.View, belowTheBottomMarginOf itemB: Any?,
                   times multiplier: CGFloat = 1.0,
                   by constant: CGFloat = 0.0,
                   priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the bottom margin of the item prior to the constant being applied

    constant

    The amount to offset the object’s top edge from the bottom margin of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s leading edge to the trailing edge of item

    Declaration

    Swift

    @discardableResult
    public func follow(theTrailingEdgeOf itemB: Any?,
                      with itemA: Constraid.View,
                      times multiplier: CGFloat = 1.0,
                      by constant: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the trailing edge of the item prior to the constant being applied

    constant

    The amount to offset the object’s leading edge from the trailing edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s trailing edge to the leading edge of item

    Declaration

    Swift

    @discardableResult
    public func precede(theLeadingEdgeOf itemB: Any?,
                       with itemA: Constraid.View,
                       times multiplier: CGFloat = 1.0,
                       by constant: CGFloat = 0.0,
                       priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the leading edge of the item prior to the constant being applied

    constant

    The amount to offset the object’s trailing edge from the leading edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s bottom edge to the top edge of item

    Declaration

    Swift

    @discardableResult
    public func set(_ itemA: Constraid.View, aboveTheTopEdgeOf itemB: Any?,
                   times multiplier: CGFloat = 1.0,
                   by constant: CGFloat = 0.0,
                   priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the top edge of the item prior to the constant being applied

    constant

    The amount to offset the object’s bottom edge from the top edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the receiver’s top edge to the bottom edge of item

    Declaration

    Swift

    @discardableResult
    public func set(_ itemA: Constraid.View, belowTheBottomEdgeOf itemB: Any?,
                   times multiplier: CGFloat = 1.0,
                   by constant: CGFloat = 0.0,
                   priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the bottom edge of the item prior to the constant being applied

    constant

    The amount to offset the object’s top edge from the bottom edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading edge to the leading edge of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withLeadingEdgeOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading edge of the item prior to the inset being applied.

    inset

    The amount to inset the object from the leading edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s trailing edge to the trailing edge of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withTrailingEdgeOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailing edge of the item prior to the inset being applied.

    inset

    The amount to inset the object from the trailing edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top edge to the top edge of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withTopEdgeOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top edge of the item prior to the inset being applied.

    inset

    The amount to inset the object from the top edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s bottom edge to the bottom edge of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withBottomEdgeOf itemB: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to bottom edge of the item prior to the inset being applied.

    inset

    The amount to inset the object from the bottom edge of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading & trailing edges to the leading & trailing edges of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withVerticalEdgesOf item: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading & trailing edges of the item prior to the inset being applied.

    inset

    The amount to inset the object from the leading & trailing edges of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top & bottom edges to the top & bottom edges of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withHorizontalEdgesOf item: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top & bottom edges of the item prior to the inset being applied.

    inset

    The amount to inset the object from the top & bottom edges of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading, trailing, top & bottom edge to the leading, trailing, top & bottom edge of item

    Declaration

    Swift

    @discardableResult
    public func flush(_ itemA: Constraid.View, withEdgesOf item: Any?, times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                      priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading, trailing, top & bottom edges of the item prior to the inset being applied.

    inset

    The amount to inset the object from the leading, trailing, top & bottom edges of the item

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Set width of receiver using a constraint in auto-layout

    Declaration

    Swift

    @discardableResult
    public func setWidth(of item: Constraid.View, to constant: CGFloat, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    item

    The item you want to constrain

    constant

    The value to set the width to

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Expand width of receiver using a constraint in auto-layout

    Declaration

    Swift

    @discardableResult
    public func expandWidth(of item: Constraid.View, from constant: CGFloat, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    item

    The item you want to constrain

    constant

    The minimum width to expand from

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Limit width of receiver using a constraint in auto-layout

    Declaration

    Swift

    @discardableResult
    public func limitWidth(of item: Constraid.View, by constant: CGFloat, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    item

    The item you want to constrain

    constant

    The maximum width to limit by

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Set height of receiver using a constraint in auto-layout

    Declaration

    Swift

    @discardableResult
    public func setHeight(of item: Constraid.View, to constant: CGFloat, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    item

    The item you want to constrain

    constant

    The value to set the height to

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Expand height of receiver using a constraint in auto-layout

    Declaration

    Swift

    @discardableResult
    public func expandHeight(of item: Constraid.View, from constant: CGFloat, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    item

    The item you want to constrain

    constant

    The minimum height to expand from

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Limit height of receiver using a constraint in auto-layout

    Declaration

    Swift

    @discardableResult
    public func limitHeight(of item: Constraid.View, by constant: CGFloat, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired) -> Constraid.ConstraintCollection

    Parameters

    item

    The item you want to constrain

    constant

    The maximum height to limit by

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Set width of receiver to width of item

    Declaration

    Swift

    @discardableResult
    public func matchWidth(of itemA: Constraid.View, to itemB: Any?,
                         times multiplier: CGFloat = 1.0,
                         by constant: CGFloat = 0.0,
                         priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the item

    constant

    The amount to adjust the constraint by

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Set height of receiver to heigt of item

    Declaration

    Swift

    @discardableResult
    public func matchHeight(of itemA: Constraid.View, to itemB: Any?,
                          times multiplier: CGFloat = 1.0,
                          by constant: CGFloat = 0.0,
                          priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to the item

    constant

    The amount to adjust the constraint by

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Add constraint to receiver declaring it square

    Declaration

    Swift

    @discardableResult
    public func equalize(_ item: Constraid.View,
        priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    item

    The item you want to constrain

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s center to the vertical center of item within the margins of item

    Declaration

    Swift

    @discardableResult
    public func center(_ itemA: Constraid.View, verticallyWithinMarginsOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     offsetDirection direction: Constraid.VerticalOffsetDirection = .down,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to center of the item prior to the offset being applied.

    offset

    The amount to offset the object vertically from the center of the item

    direction

    The vertical direction (.up|.down) to offset the object

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s center to the horizontal center of item within the margins of item

    Declaration

    Swift

    @discardableResult
    public func center(_ itemA: Constraid.View, horizontallyWithinMarginsOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     offsetDirection direction: Constraid.HorizontalOffsetDirection = .right,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to center of the item prior to the offset being applied.

    offset

    The amount to offset the object horizontally from the center of the item

    direction

    The horizontal direction (.right|.left) to offset the object

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s center to the vertical & horizontal center of item within the margins of item

    Declaration

    Swift

    @discardableResult
    public func center(_ itemA: Constraid.View, withinMarginsOf itemB: Any?,
                     times multiplier: CGFloat = 1.0,
                     offsetBy offset: CGFloat = 0.0,
                     offsetDirection direction: Constraid.OffsetDirection = .downAndRight,
                     priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to center of the item prior to the offset being applied.

    offset

    The amount to offset the object vertically & horizontally from the center of the item

    direction

    The direction (.downAndright|.upAndleft) to offset the object

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Sets height content hugging and compression resistance priority

    Declaration

    Swift

    public func keepIntrinsicHeight(of itemA: Constraid.View, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired)

    Parameters

    itemA

    The item you want to constrain

    priority

    The priority this constraint uses when being evaluated against other constraints

  • Sets width content hugging and compression resistance priority

    Declaration

    Swift

    public func keepIntrinsicWidth(of itemA: Constraid.View, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired)

    Parameters

    itemA

    The item you want to constrain

    priority

    The priority this constraint uses when being evaluated against other constraints

  • Sets height & width content hugging and compression resistance priority

    Declaration

    Swift

    public func keepIntrinsicSize(of itemA: Constraid.View, priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired)

    Parameters

    itemA

    The item you want to constrain

    priority

    The priority this constraint uses when being evaluated against other constraints

  • Constrains the object’s leading, top, and bottom edges to be equal to the leading, top, and bottom edges of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byLeadingEdgeOf itemB: Any?,
                       times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                       priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading, top, and bottom edges of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s trailing, top, and bottom edges to be equal to the trailing, top, and bottom edges of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byTrailingEdgeOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailing, top, and bottom edges of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s leading, top, and trailing edges to be equal to the leading, top, and trailing edges of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byTopEdgeOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading, top, and trailing edges of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s leading, bottom, and trailing edges to be equal to the leading, bottom, and trailing edges of itemB

    Declaration

    Swift

    @discardableResult
    public func cup(_ itemA: Constraid.View, byBottomEdgeOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading, bottom, and trailing edges of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority these constraints use when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraints

  • Constrains the object’s leading edge to be less than or equal to the leading margin of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byLeadingMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s trailing edge to be less than or equal to the leading margin of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byTrailingMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailing margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top edge to be less than or equal to the top margin of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byTopMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s bottom edge to be less than or equal to the bottom margin of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byBottomMarginOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to bottom margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top & bottom edges to be less than or equal to the top & bottom margin of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byHorizontalMarginsOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top & bottom margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading & trailing edges to be less than or equal to the leading & trailing margin of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byVerticalMarginsOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading & trailing margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top, bottom, leading & trailing edges to be less than or equal to the top, bottom, leading & trailing margin of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byMarginsOf itemB: Any?,
                    times multiplier: CGFloat = 1.0, insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top, bottom, leading & trailing margin of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading edge to be less than or equal to the leading edge of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byLeadingEdgeOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s trailing edge to be less than or equal to the leading edge of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byTrailingEdgeOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to trailing edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top edge to be less than or equal to the top edge of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byTopEdgeOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s bottom edge to be less than or equal to the bottom edge of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byBottomEdgeOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to bottom edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top & bottom edges to be less than or equal to the top & bottom edge of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byHorizontalEdgesOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top & bottom edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s leading & trailing edges to be less than or equal to the leading & trailing edge of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byVerticalEdgesOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to leading & trailing edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint

  • Constrains the object’s top, bottom, leading & trailing edges to be less than or equal to the top, bottom, leading & trailing edge of item

    Declaration

    Swift

    @discardableResult
    public func limit(_ itemA: Constraid.View, byEdgesOf itemB: Any?,
                    times multiplier: CGFloat = 1.0,
                    insetBy inset: CGFloat = 0.0,
                    priority: Constraid.LayoutPriority = Constraid.LayoutPriorityRequired
        ) -> Constraid.ConstraintCollection

    Parameters

    itemA

    The item you want to constrain in relation to another object

    itemB

    The item you want to constrain itemA against

    multiplier

    The ratio altering the constraint relative to top, bottom, leading & trailing edge of the item prior to the constant being applied.

    constant

    The amount to add to the constraint equation after the multiplier.

    priority

    The priority this constraint uses when being evaluated against other constraints

    Return Value

    Constraint collection containing the generated constraint