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

How do i get rid of the top box when i embed a navigation controller?

Everytime I add a navigation controller and i link it to a view controller, it appears a white box appears under the phone's clock and percentage battery. How do i get rid of this on my root view controller (or first view controller, however you want to call it) ?

2 Answers

in your viewDidLoad put this line of code

          [self.navigationItem setHidesBackButton:YES animated:YES];

-(void)viewWillAppear:(BOOL)animated { [self.navigationController.navigationBar setHidden:YES]; }