Contents

widthAnchor

A layout anchor representing the width of the view’s frame.

Declaration

var widthAnchor: NSLayoutDimension { get }

Discussion

Use this anchor to create constraints with the view’s width. You can only combine this anchor with other NSLayoutDimension anchors. For more information, see NSLayoutAnchor.

See Also

Creating Constraints Using Layout Anchors