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 is dedicated 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 make your code more debugger friendly and minimize time spent diagnosing layout issues. You’ll find ideas that will help ...

Get iOS Auto Layout Demystified, Second Edition now with the O’Reilly learning platform.

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