i created a navigation based application for my project.. i replaced the launch class from a UITableView subclass to UIViewController subclass without replacing the default tableView in it. Now when i navigate to other classes from this class no back button is displayed. i even tried the following code but got no results.. how can i enable the backbutton in my navigation bar?? in btw i just updated my iPhone to iOS 4.2.1 just want to confirm if it has some bug due to which back button is not displayed??
UIBarButtonItem *_backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleDone target:nil action:nil];
self.navigationItem.backBarButtonItem = _backButton;
There’s a hideBackButton property on UINavigationItem. You could set that to false, perhaps?
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UINavigationItem_Class/Reference/UINavigationItem.html#//apple_ref/occ/instp/UINavigationItem/hidesBackButton
However, it sounds like there’s some reason why it’s not showing up, like you’re jumping around on the navigation stack manually or something.