Protocol

UILayoutSupport

A set of methods that provide layout support and access to layout anchors.

Overview

This protocol is implemented by the UIViewController properties topLayoutGuide and bottomLayoutGuide to support using Auto Layout with a view controller’s view. You can use layout guides as layout items in the NSLayoutConstraint factory methods.

Topics

Layout Support

var length: CGFloat

Provides the length, in points, of the portion of a view controller’s view that is overlaid by translucent or transparent UIKit bars.

Required.

Creating Constraints Using Layout Anchors

var bottomAnchor: NSLayoutYAxisAnchor

A layout anchor representing the guide’s bottom edge.

Required.

var heightAnchor: NSLayoutDimension

A layout anchor representing the guide’s height.

Required.

var topAnchor: NSLayoutYAxisAnchor

A layout anchor representing the guide’s top edge.

Required.

Relationships

Inherits From

See Also

Constraints

Positioning Content Within Layout Margins

Position views so that they are not crowded by other content.

Positioning Content Relative to the Safe Area

Position views so that they are not obstructed by other content.

class NSLayoutConstraint

The relationship between two user interface objects that must be satisfied by the constraint-based layout system.