Constraints and Frames

Auto Layout constraints work with the same underlying frame geometry introduced in Chapter 4, “Assembling Views and Animations.” Constraints on views ultimately resolve to a frame. Much of the power of Auto Layout revolves around properly handling views with dynamic and varied content when laying out the UI. UIView supports two additional properties—intrinsic content size and alignment rectangles—that extend beyond the traditional frame geometry, allowing Auto Layout to construct the appropriate relationships between views.

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.