MutableLayoutConstraint
public class MutableLayoutConstraint : LayoutConstraintProtocol
Layout constraint that creates possibility to change active state.
-
Flag, defines that constraint may be used for layout
Declaration
Swift
public var isActive: Bool { get set } -
Designed initializer
Declaration
Swift
public init(base: LayoutConstraintProtocol, isActive: Bool)Parameters
baseConstraint for mutating
isActiveInitial state
-
Converts rect from constraint coordinate space to destination coordinate space if needed.
Declaration
Swift
public func convert(rectIfNeeded rect: CGRect, to coordinateSpace: LayoutElement) -> CGRectParameters
rectInitial rect
coordinateSpaceDestination coordinate space
Return Value
Converted rect
-
Return rectangle for constrain source rect
Declaration
Swift
public func constrainRect(for currentSpace: CGRect, in coordinateSpace: LayoutElement) -> CGRectParameters
currentSpaceSource rect in current state
coordinateSpaceWorking coordinate space
Return Value
Rect for constrain
-
LayoutElementobject associated with this constraintDeclaration
Swift
public func layoutElement(is object: AnyObject) -> Bool -
Flag that constraint not required other calculations. It`s true for size-based constraints.
Declaration
Swift
public var isIndependent: Bool { get }
MutableLayoutConstraint Class Reference