ROMView

public extension ROMView

Public Properties

  • Returns the default nib name for the receiver which is its class name.

    Declaration

    Swift

    static var defaultNibName: String { get }
  • Returns the default reuse identifier for the receiver which is its class name.

    Declaration

    Swift

    static var defaultReuseIdentifier: String { get }

Public Functions

  • Returns a set of layout constraints that will pin the receiver to edges and/or safeAreaLayoutGuideEdges of its superview with edgeInsets, the provided priority, and optionally activate the constraints before returning.

    Declaration

    Swift

    @discardableResult
    func pinToSuperviewEdges(_ edges: NSDirectionalRectEdge = .all, safeAreaLayoutGuideEdges: NSDirectionalRectEdge = [], edgeInsets: NSDirectionalEdgeInsets? = nil, priority: ROMLayoutConstraintPriority = .required - 1.0, activate: Bool = true) -> [NSLayoutConstraint]

    Parameters

    edges

    The edges to pin to, the default is NSDirectionalRectEdge.all

    safeAreaLayoutGuideEdges

    The safe area layout guide edges to pin to, takes priority over edges

    edgeInsets

    The edge insets to inset the receiver from the edges of its superview

    priority

    The layout constraint priority to apply to the returned constraints, the default is ROMLayoutConstraintPriority.required - 1.0

    activate

    Whether to activate the layout constraints before returning them

    Return Value

    The layout constraints