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

View Layout

class NSLayoutConstraint

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

class UILayoutGuide

A rectangular area that can interact with Auto Layout.

class NSLayoutAnchor

A factory class for creating layout constraint objects using a fluent API.

class NSLayoutDimension

A factory class for creating size-based layout constraint objects using a fluent API.

class NSLayoutXAxisAnchor

A factory class for creating horizontal layout constraint objects using a fluent API.

class NSLayoutYAxisAnchor

A factory class for creating vertical layout constraint objects using a fluent API.