Cocoa Programming for OS X: The Big Nerd Ranch Guide
by Aaron Hillegass, Adam Preble, Nate Chandler
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.) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access