EdgeAligningView
@MainActor
public final class EdgeAligningView<CustomView> : UIView where CustomView : UIView
A container that can loosen selected edges of its customView from its layout margins.
When both edges of an axis are flexible, customView must provide its own size on that axis through intrinsic
content size or constraints.
-
Represents an edge of
See moreEdgeAligningViewDeclaration
Swift
public enum Edge : CaseIterable -
Edges that may move away from the container’s layout margins.
Declaration
Swift
@MainActor public var flexibleEdges: Set<Edge> { get set } -
Contained view.
Declaration
Swift
@MainActor public var customView: CustomView { get set } -
Preferred priority of the internal constraints.
Declaration
Swift
@MainActor public var preferredPriority: UILayoutPriority { get set } -
Initializes and returns a newly allocated
EdgeAligningViewDeclaration
Swift
@MainActor public init( with customView: CustomView, flexibleEdges: Set<Edge> = [], preferredPriority: UILayoutPriority = .required )Parameters
customViewAn instance of
CustomViewflexibleEdgesSet of edges to be set as loose.
preferredPriorityPreferred priority of the internal constraints.
-
Initializes and returns a newly allocated view object with the specified frame rectangle.
Declaration
Swift
@MainActor public override init(frame: CGRect)Parameters
frameThe frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it.
-
Initializes and returns a newly allocated view object with the specified frame rectangle.
Declaration
Swift
@MainActor public init( frame: CGRect, flexibleEdges: Set<Edge> = [], preferredPriority: UILayoutPriority = .required )Parameters
frameThe frame rectangle for the view, measured in points. The origin of the frame is relative
flexibleEdgesSet of edges to be set as loose.
preferredPriorityPreferred priority of the internal constraints. to the superview in which you plan to add it.
-
A Boolean value that indicates whether the receiver depends on the constraint-based layout system.
Declaration
Swift
@MainActor public override class var requiresConstraintBasedLayout: Bool { get } -
Updates constraints for the view.
Declaration
Swift
@MainActor public override func updateConstraints()