O'Reilly logo

The Core iOS Developer’s Cookbook, Fifth Edition by Rich Wardwell, Erica Sadun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Laws of Constraints

Although you can think of constraints as hard “math,” they’re actually just preferences. iOS finds a layout solution that best matches your constraints; this solution may not always be unique. Here are a few basic facts about constraints:

Image Constraints are relationships, not directional. You don’t have to solve the right side to calculate the left side.

Image Constraints have priorities. Priorities range numerically from 0 to 1,000. The Auto Layout system uses priorities to sort constraints. Higher priorities are always satisfied ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required