My standard implementation for this delegate method is the following. I just initialize the navigation button and save locally the button and the popover.
- (void) splitViewController: (UISplitViewController *) splitController
willHideViewController: (UIViewController *) viewController
withBarButtonItem: (UIBarButtonItem *) barButtonItem
forPopoverController: (UIPopoverController *) popoverController
{
// Set the button to open the PopOver
barButtonItem.title = viewController.title;
[self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
// Save the ref to the default left navigation button
_masterButton = barButtonItem;
// Save the ref to the PopOver
_masterPopOver = popoverController;
}
From iOS 8 this method is deprecated and the Apple documentation says:
Implement the splitViewController:willChangeToDisplayMode: method instead.
But the arguments of the new method has nothing to do with the deprecated method! I guess I have to create a button and a popover myself?
Does somebody already made this re-coding to implement the current popup behaviour?
Thank you for your help