NSLayoutAnchor
public extension NSLayoutAnchor
Anchor+Shortcut add the shortcut for creating a constraint.
Version
1.6.7Date
30/06/2022-
Create the constant between two anchor.
Declaration
Swift
@discardableResult @objc func setDistance(_ distance: CGFloat, to anchor: NSLayoutAnchor) -> NSLayoutConstraintParameters
distanceThe distance between two anchors
anchorThe second anchor
Return Value
The generated constraint
-
Create the constant between two anchor.
Declaration
Swift
@discardableResult @objc func align(to anchor: NSLayoutAnchor) -> NSLayoutConstraintParameters
anchorThe second anchor
Return Value
The generated constraint
NSLayoutAnchor Extension Reference