O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

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

Does Not Compute, Part 1: Unsatisfiable Constraints

Because constraints are expressed as mathematical expressions and Auto Layout’s job is to solve the entire system together, you may sometimes run into situations where Auto Layout cannot solve the system. Generally this will occur if there are too many or too few constraints.

If there are too many constraints, or if the constraints conflict with each other, we say that the constraints are unsatisfiable. If this happens, the Auto Layout system will recognize it at runtime and print debug information to the console, providing you with a list of the constraints which are in conflict. (If you added your unsatisfiable constraints in Interface Builder, it would inform you of this immediately.) ...

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