ResizingConstraint

class ResizingConstraint

An object containing the list of resizing constraints which must be upheld when resizing a Layer as a result of resizing it’s parent.

  • A string represention of the resizing constraint.

    Declaration

    var rawValue: Double { get }
  • The list of constraints that must be upheld while resizing the layer.

    Declaration

    var pinnedElements: Array { get }
  • The list of constraints that need not be upheld while resizing the layer.

    Declaration

    var flexibleElements: Array { get }
  • The object’s description

    Declaration

    var description: String { get }
  • Compares two values for equality.

    The equals function is invoked using infix notation as in the following code snippet: lhs == rhs.

    Declaration

    func equals(_ lhs: ResizingConstraint) -> Bool

    Parameters

    lhs

    A value.

    rhs

    Another value.

    Return Value

    true if the lhs and rhs are equal, false otherwise.

  • Checks if the given constraint applies or not.

    Takes in one string parameter representing a constraint type. The constraint can be one of the following values; right, left, top, bottom, width, and height.

    Declaration

    func isPinned(_ constraint: String) -> Bool

    Parameters

    constraint

    The constaint whose application is checked.

    Return Value

    true if the constraint applies, and false otherwise.