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
equalsfunction is invoked using infix notation as in the following code snippet:lhs == rhs.Declaration
func equals(_ lhs: ResizingConstraint) -> BoolParameters
lhsA value.
rhsAnother value.
Return Value
trueif thelhsandrhsare equal,falseotherwise. -
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) -> BoolParameters
constraintThe constaint whose application is checked.
Return Value
trueif the constraint applies, andfalseotherwise.