In my UISplitViewController, I want the "master" part of the view to hide itself and the "detail" part take over the full screen when the user clicks a button in landscape. Likewise, clicking the button again takes the user back the standard, split screen view. Is it possible to do this with the built-in class?
Asked
Active
Viewed 1,427 times
0
-
You mean like in the Facebook App? If not there's a similar question here: http://stackoverflow.com/questions/2700453/how-to-hide-master-view-in-uisplitviewcontroller-in-ipad – pkluz Feb 01 '12 at 22:24
-
That other question is only when the app changes orientation though. In this case, I want pretty much that same behavior to activate when a button is pressed instead. – TheEnigmaMachine Feb 01 '12 at 22:27
1 Answers
-1
There's a method you can implement from UISplitViewControllerDelegate in iOS5:
- (BOOL)splitViewController:(UISplitViewController*)svc
shouldHideViewController:(UIViewController *)vc
inOrientation:(UIInterfaceOrientation)orientation
{
return YES;
}
MGSplitViewController has that functionality built in for pre-ios5 work.

shawnwall
- 4,549
- 1
- 27
- 38