Center

public struct Center : RectBasedConstraint, Extensible

Set of constraints related to center of restrictive rect

  • Undocumented

    Declaration

    Swift

    public typealias Conformed = RectBasedConstraint
  • Main function for constrain source space by other rect

    Declaration

    Swift

    public func formConstrain(sourceRect: inout CGRect, by rect: CGRect)

    Parameters

    sourceRect

    Source space

    rect

    Rect for constrain

  • Common method for create entity of this type with base behavior.

    Declaration

    Swift

    public static func build(_ base: RectBasedConstraint) -> Center

    Parameters

    base

    Entity implements required behavior

    Return Value

    Initialized entity

  • Returns alignment constraint by center

    Declaration

    Swift

    public static func align(by dependency: AlignDependence) -> Center

    Parameters

    dependency

    Anchor dependency for target rect

    Return Value

    Alignment constraint typed by Center

  • Undocumented

    See more

    Declaration

    Swift

    public struct AlignDependence : RectBasedConstraint