5. Debugging Constraints

So, you have taken the plunge and added constraints to your project. Now, things either don’t work the way you expect or you are seeing dreaded errors about conflicting constraints. Constraints can be maddeningly opaque. The code and interface files you create them with don’t lend themselves to easy perusal. It takes only a few “helpful” Xcode log messages to make some developers start pulling out their hair. This chapter dedicates itself to shining light upon the lowly constraint.

You’re about to dive into varied and exhaustive ways to read logs and explore constraints more manageably. Helper functions will make your code more debugger-friendly and minimize time spent diagnosing layout issues. You’ll find ideas that ...

Get iOS Auto Layout Demystified now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.