Instance Method

splitViewController:willHideViewController:withBarButtonItem:forPopoverController:

Tells the delegate that the specified view controller is about to be hidden.

Declaration

- (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc;

Parameters

svc

The split view controller that owns the specified view controller.

aViewController

The view controller being hidden.

barButtonItem

A button you can add to your toolbar.

pc

The popover controller that uses taps in barButtonItem to display the specified view controller.

Discussion

When the split view controller rotates from a landscape to portrait orientation, it normally hides one of its view controllers. When that happens, it calls this method to coordinate the addition of a button to the toolbar (or navigation bar) of the remaining custom view controller. If you want the soon-to-be hidden view controller to be displayed in a popover, you must implement this method and use it to add the specified button to your interface.

See Also

Deprecated Methods

- splitViewController:shouldHideViewController:inOrientation:

Asks the delegate whether the first view controller should be hidden for the specified orientation.

Deprecated
- splitViewController:willShowViewController:invalidatingBarButtonItem:

Tells the delegate that the specified view controller is about to be shown again.

Deprecated
- splitViewController:popoverController:willPresentViewController:

Tells the delegate that the hidden view controller is about to be displayed in a popover.

Deprecated