0

In IOS 3.2 I was able to display my UISplitViewController side by side like in landscape mode.

In IOS 4.2 the RootViewController (MasterView) is not showing up in portrait mode. Does anyone know if we need to display the rootviewcontroll in a popover? Can we display it side by side like how it is in landscape mode?

I want to avoid having to click on a button to show the masterview (when in portrait mode)

KingofBliss
  • 15,055
  • 6
  • 50
  • 72
Arcadian
  • 4,312
  • 12
  • 64
  • 107

3 Answers3

0

In that case, you can skip the splitviewcontroller and create only view base application where you could manually control the UI.

Mahmud Ahsan
  • 1,755
  • 19
  • 18
-1

I used setHidesMasterViewInPortrait:NO and it did work on the pre-5.0 releases, and even got into the apple store once. But the next time I updated the app, they rejected it because I used a hidden API. I am still searching for a way to make this work.

Nancy
  • 406
  • 5
  • 15
-1
  1. on viewDidAppear you can do

    [splitViewController setHidesMasterViewInPortrait:NO];

It works even though you get a warning. I think you can create category with a custom splitviewcontroller to get rid of the warning.

2.Otherwise you can do something like

on the viewWillAppear, you can do something like

if (self.interfaceOrientation == UIInterfaceOrientationPortrait || self.interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
    UIViewController *master = [[splitViewController.viewControllers objectAtIndex:0];
    UIViewController *detail = [[splitViewController.viewControllers objectAtIndex:1];
    [splitViewController setupPortraitMode:master detail:detail];

}

(setupPortraitMode ) http://intensedebate.com/profiles/fgrios.

surajz
  • 3,471
  • 3
  • 32
  • 38
  • 2
    It seems like setHidesMasterViewInPortrait is the private method. Please let me know if that is the case? – UPT Mar 20 '12 at 07:09