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
lhsA value.
rhsAnother value.
Return Value
true
if thelhs
andrhs
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
constraintThe constaint whose application is checked.
Return Value
true
if the constraint applies, andfalse
otherwise.