I'm trying to add a rightBarButtonItem to the navigationitem.But whatever I do I can not see the button on the navigation bar. If I NSLog for self.navigationItem.title I get the right title.And also if I NSLog the rightBarButtonItem I get the barbutton item's memory locatioin, so not null. Here's how I add my bar button item:
UIBarButtonItem *barButton= [[UIBarButtonItem alloc] initWithTitle:......];
self.navigationItem.rightBarButtonItem=barButton;
What should I do to make the button visible on the navigation bar.
EDIT: Here's the ViewCOntroller hierarchy:
MechViewController//This gets pushed to the navigation stack
PageViewController//This is created in the MechViewController viewDidLoad method and added as a childViewController
PhotoViewController//This is view controller that I add to the PageViewController's viewControllers array. This is where I need to add bar button item and specify its action.