LayoutGuide
open class LayoutGuide<Super> : LayoutElement, ElementInLayoutTime where Super : LayoutElement
extension LayoutGuide: CustomDebugStringConvertible
LayoutGuides will not show up in the view hierarchy, but may be used as layout element in
an RectBasedConstraint and represent a rectangle in the layout engine.
Create a LayoutGuide with -init
Add to a view with UIView.add(layoutGuide:)
If you use subclass LayoutGuide, that manages LayoutElement elements, than you should use
layout(in: frame) method for apply layout, otherwise elements will be have wrong position.
-
Undocumented
Declaration
Swift
public var superLayoutBounds: CGRect { get } -
Entity that represents element in layout time
Declaration
Swift
public var inLayoutTime: ElementInLayoutTime { get } -
Internal space for layout subelements
Declaration
Swift
public var layoutBounds: CGRect { get } -
Layout element where added this layout guide. For addition use
func add(layoutGuide:).Declaration
Swift
open internal(set) weak var ownerElement: Super? { get set } -
External representation of layout entity in coordinate space
Declaration
Swift
open var frame: CGRect { get set } -
Internal coordinate space of layout entity
Declaration
Swift
open var bounds: CGRect { get set } -
Layout element that maintained this layout entity
Declaration
Swift
open weak var superElement: LayoutElement? -
Removes layout element from hierarchy
Declaration
Swift
open func removeFromSuperElement() -
Undocumented
Declaration
Swift
public init(frame: CGRect = .zero) -
Tells that a this layout guide was added to owner
Declaration
Swift
open func didAddToOwner() -
Performs layout for subelements, which this layout guide manages, in layout space rect
Declaration
Swift
open func layout(in rect: CGRect)Parameters
rectSpace for layout
-
Undocumented
Declaration
Swift
open func add(to owner: Super) -
Undocumented
Declaration
Swift
open var debugContentOfDescription: String { get }
-
Declaration
Swift
public var debugDescription: String { get } -
Creates dependency between two layout guides.
Declaration
Swift
func add(layoutGuide: LayoutGuide<Super>)Parameters
layoutGuideChild layout guide.
-
Undocumented
Declaration
Swift
public func convert(point: CGPoint, to item: LayoutElement) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(point: CGPoint, from item: LayoutElement) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(rect: CGRect, to item: LayoutElement) -> CGRect -
Undocumented
Declaration
Swift
public func convert(rect: CGRect, from item: LayoutElement) -> CGRect
-
Undocumented
Declaration
Swift
public func convert(point: CGPoint, to item: LayoutElement) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(point: CGPoint, from item: LayoutElement) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(rect: CGRect, to item: LayoutElement) -> CGRect -
Undocumented
Declaration
Swift
public func convert(rect: CGRect, from item: LayoutElement) -> CGRect
-
Undocumented
Declaration
Swift
public func convert(_ point: CGPoint, to view: NSView) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(_ point: CGPoint, from view: NSView) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(_ point: CGPoint, to layer: CALayer, superLayer: CALayer) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(_ point: CGPoint, from layer: CALayer, superLayer: CALayer) -> CGPoint
-
Undocumented
Declaration
Swift
public func convert(_ point: CGPoint, to coordinateSpace: CALayer) -> CGPoint -
Undocumented
Declaration
Swift
public func convert(_ point: CGPoint, from coordinateSpace: CALayer) -> CGPoint -
Fabric method for generation layer with any type
Declaration
Swift
func build<L>(_ type: L.Type) -> L where L : CALayerParameters
typeType of layer
Return Value
Generated layer
-
Generates layer and adds to
superElementhierarchyDeclaration
Swift
@discardableResult func add<L>(_ type: L.Type) -> L? where L : CALayerParameters
typeType of layer
Return Value
Added layer
LayoutGuide Class Reference