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

willemVP

macrumors newbie
Original poster
Aug 4, 2011
7
0
I want to hide the title in my navigation bar.
But I still need my title to go back, so I need to set it.

How can I hide it?
 
If you're in a UIViewController, then it may be as simple as;
Code:
[self setTitle: @""];

Otherwise you may need to dig deeper into the UINavigationItem, which a UIViewController has, or even the UINavigationController.
 
Hiding Title

If you're not in a view controller, you could use the following code:
Code:
[[[navigationController viewControllers] lastObject] setTitle:@""];
Then you'd just have to worry about saving the title somewhere.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.