View Geometry

While direct control of view geometry is less necessary now than it used to be, thanks to Apple’s introduction of Auto Layout, these tasks continue to play a fundamental role in some situations when working with views. Some of Apple’s new APIs, such as the ones that introduce view physics, do not play nicely with Auto Layout. Because of this, you should master the basic ways you interact and adjust view geometry.

Geometric properties define where each view appears, what their sizes are, and how they are oriented. These properties remain valid, even when using Auto Layout; under Auto Layout, they are managed by the constraint system. You can still query and view these properties to retrieve information about where a view has been ...

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.