I just want to change the title in my iPad split view application of the button that initiates the Popover in portrait mode (showing the master view). I cannot, for the life of me, figure out how to reference this button. I started the application by creating a new project using the master detail application template (iOS 5 and storyboards) and most of the interface code began in the storyboard file. Any help is appreciated.
1 Answers
5
votes
Inside your detail view you'll find a delegate method of your split view wich is for adding the new button in portrait mode (there are also similar methods wich are maybe used - but they all have the UIBarButtonItem* argument):
-(void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc
{
barButtonItem.title = @"Your custom title goes here";
[self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
self.masterPopoverController = pc;
}
And that's it - you're done.