Aligning Views and Flexible Sizing

It is supremely easy to align views with constraints:

Image The four format strings "H:|[self]", "H:[self]|", "V:|[self]", and "V:[self]|", respectively, produce left, right, top, and bottom alignment.

Image Add a predicate with a sizing relation, and these format strings become stretch to left, stretch to right, and so on: "H:|[self(>0)]", "H:[self(>0)]|", "V:|[self(>0)]", and "V:[self(>0)]|".

Image A second vertical pipe adds ...

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.