I am trying to create a back button on a navigation bar.
Here is my code: -
UIBarButtonItem *barButton = [[[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleBordered target:self action:nil]autorelease]; self.navigationItem.rightBarButtonItem = barButton;
But nothing is displayed on the navigation bar.
I am using a UIViewController, not a UINavigationController.
Is the UINavigationController method the only way to achieve this?
Any help would be really appreciated.
Any reference to a good tutorial would be great.
Thanks.
source share