views:

186

answers:

2

I've used [[self navigationController] setTitle:@"Test Title"] to no avail. This is the same way I do it in the rest of my app. What could cause this?

A: 

Try setting the title of the navigation item.

self.navigationItem.title = @"Test Title";

Or like this if you prefer

[[self navigationItem] setTitle:@"Test Title"];
Rengers
A: 

You are using the title property incorrectly, the navigationController has a title property because it inherets from UIViewController, the title property is used by NavigationControllers to display a title, so if you wanted the title you gave your NavigationController to show you would need to present it in another NavigationCOntroller...But what you need to do, is set the viewControllers that you are displaying titles instead of the NavigationController, now whenever u display that VC youll see the title in the navigation bar... In short...the viewcontrollers title property is used by its navigationController to display the title on the navigation bar when that viewcontroller is on the top of the navigation stack...

Daniel
I'm pretty sure you answered the question like Rengers did but I can't seem to understand what you said..
Joshua
no, he is setting the navigationItems title, if you take your viewController and set its title property then push it on top of a navigation stack you will see that title as the title.
Daniel