centerYAnchor
A layout anchor representing the vertical center of the view’s frame.
Declaration
var centerYAnchor: NSLayoutYAxisAnchor { get }Discussion
Use this anchor to create constraints with the view’s vertical center. You can only combine this anchor with other NSLayoutYAxisAnchor anchors. For more information, see NSLayoutAnchor.