Instance Property

leftAnchor

A layout anchor representing the left edge of the view’s frame.

Declaration

var leftAnchor: NSLayoutXAxisAnchor { get }

Discussion

Use this anchor to create constraints with the view’s left edge. You can combine this anchor only with a subset of the NSLayoutXAxisAnchor anchors. You can combine a UIView with another leftAnchor, a rightAnchor, or a centerXAnchor. For more information, see NSLayoutAnchor.