Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dantastic

macrumors 6502a
Original poster
Jan 21, 2011
572
678
I want to remove the top bar of a UINavigation controller.



Code:
-(void)viewWillAppear:(BOOL)animated {
	self.navigationController.navigationBarHidden = YES;
...

- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {	
	self.navigationController.navigationBarHidden = NO;

I simply hide the navigation bar as the main table view loads and I show it as I push the next view so that I can go back.

The problem with this approach is that as soon as the back button is pressed the top bar is removed and for the split second while the view is animating (popping) back, I've a big ugly white bar where the back navigation bar was just moments ago.

I have been setting all possible background colors to black but it's still white. If I can get the color under the navigation bar to be black that would work.
 
Robbie mate, legend! I really need to learn to read the documentation.

Cheers!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.