ROMView
public extension ROMView
-
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 }
-
Returns a set of layout constraints that will pin the receiver to
edges
and/orsafeAreaLayoutGuideEdges
of its superview withedgeInsets
, the providedpriority
, and optionallyactivate
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
-
Sets the receiver’s
translatesAutoresizingMaskIntoConstraints
property tovalue
and returns the receiver.Declaration
Swift
func setTranslatesAutoresizingMaskIntoConstraints(_ value: Bool = false) -> Self
Parameters
value
The desired
translatesAutoresizingMaskIntoConstraints
valueReturn Value
The receiver