AdjustableLayoutElement
public protocol AdjustableLayoutElement : LayoutElement
Protocol for elements that can calculate yourself content size
-
Constraint, that defines content size of element
Declaration
Swift
var contentConstraint: RectBasedConstraint { get }
-
adjustLayoutConstraint(for:alignment:)
Extension methodConvenience getter for adjust constraint related to this element
Declaration
Swift
public func adjustLayoutConstraint(for anchors: [Size], alignment: Layout.Alignment = .equal) -> AdjustLayoutConstraint
Parameters
anchors
Array of anchor constraints
alignment
Aligns adjusted rect in space rect
Return Value
Related adjust constraint element
-
adjustLayoutConstraint(for:alignment:debug:)
Extension method
-
contentConstraint
Default implementationDefault Implementation
Constraint, that defines content size of element
Declaration
Swift
public var contentConstraint: RectBasedConstraint { get }