From the course: Learning iOS Animations with UIKit

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Finding and debugging constraints

Finding and debugging constraints - iOS Tutorial

From the course: Learning iOS Animations with UIKit

Start my 1-month free trial

Finding and debugging constraints

- [Instructor] One of the most frustrating things about working with layout constraints is debugging them in code. Luckily Xcode lets us add identifiers to our constraints to make finding them a little bit easier. Let's go into the storyboard and select the newsletter view from the document outline. We want to find its height constraint, so we'll go into its sub folder called Constraints, select height. Make sure the Utilities panel is open and that we're in the Attributes Inspector tab. And here in the identifier field we'll set this to newsletter height. Don't forget to hit Enter. For this part of the screen's animation we want the newsletter view's height to increase when we tap the More Info button, giving it an expanding effect. Now we've added an identifier for the height constraint, now all we need to do is find it and adjust it. Now we could easily do this inside our constraints animation view controller file, but it's going to make our lives a lot easier because this is…

Contents