How to hide the main part of the UISplitViewController programmatically?

In my UISplitViewController, I want the "main" part of the view to hide, and the "part" part to capture the entire screen when the user clicks the button in landscape orientation. Similarly, pressing the button again returns the user to a standard split screen view. Is it possible to do this with an inline class?

0
source share
1 answer

There is a method that you can implement from UISplitViewControllerDelegate in iOS5:

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

MGSplitViewController has built-in functionality for working with pre-ios5.

-1
source

All Articles