Instance Method

splitViewController:shouldHideViewController:inOrientation:

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

Declaration

- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation;

Parameters

svc

The split view controller that owns the first view controller.

vc

The first view controller in the array of view controllers.

orientation

The orientation being considered.

Return Value

YES if the view controller should be hidden in the specified orientation or NO if it should be visible. If you do not implement this method, a value of YES is assumed for portrait orientations and NO is assumed for landscape orientations.

Discussion

The split view controller calls this method only for the first child view controller in its array. The second view controller always remains visible regardless of the orientation.

Prior to iOS 5.0, the first view controller was always hidden in portrait orientations and always shown in landscape orientations. If you do not implement this method in your delegate object, that default behavior remains in effect.

See Also

Deprecated Methods

- splitViewController:willHideViewController:withBarButtonItem:forPopoverController:

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

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