I have a UINavigationController into which I push several views. Inside viewDidLoad for one of these views I want to set the self.navigationI
I think I found the solution for this. Simply set the button on the navigation item on the previous controller (The one that you want to go back to)
So if I have for example a root controller and I push a second controller and want to customize the back button then I should do the following:
self.navigationItem.backBarButtonItem = [[[UIBarButtonItem alloc]
initWithImage:[UIImage imageNamed:@"ico.png"] style:UIBarButtonItemStyleBordered
target:nil action:nil] autorelease];
Where self is the root view controller and not the second one.