Constraint Attributes

Constraints use a limited geometric vocabulary consisting of attributes and relations. Attributes are the “nouns” of the constraint system, describing positions within a view’s alignment rectangle. Alignment rectangles will be described in detail shortly, but for the moment, you can think of them as being closely related to the view’s frame. Relations are “verbs,” specifying how the attributes compare to each other.

The attribute nouns speak to physical geometry. Constraints offer the following view attribute vocabulary:

Image left, right, top, and bottomThe edges of a view’s alignment rectangle on the left, right, top, and bottom ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.