Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Jamie Baker
Jamie Baker
5,703 Points

Why is my Navigation Controller not causing my text labels to shift down, instead it is overlapping them?

I'm on the Adding Login and Sign Up stage of the self-destructing message app. I'm doing exactly as Ben does by adding my navigation controller at the end. But the navigation controller is overlapping my 'Username' label, instead of causing the label to shift down below it. It doesn't do that in the video.

Help would be HUGELY appreciated. Jamie

2 Answers

Stone Preston
Stone Preston
42,016 Points

hmm try this:

click on your viewController (make sure its outline in blue after clicking it, this is how you know the controller is selected and not the view.

in the attributes inspector there should be a checkbox that says extend edges under top bars. make sure its unchecked. this will cause any constraints to treat the bottom of the navigation bar as the top of the view instead of treating the top of the screen under the navigation bar as the top. this should shift any labels/controls to shift down

Jamie Baker
Jamie Baker
5,703 Points

Thanks mate this has sorted it out !!