views:

552

answers:

1

I am trying to change the master view controller (that appears in the popover in portrait, and on the left side in landscape) in a UISplitViewController. I'd like to switch between the master view controller being one of two different UIViewControllers (depending on an action taken elsewhere in my application).

I am using the following:

mySplitViewController.viewControllers = [NSArray arrayWithObjects:newMasterController, detailController, nil];

This correctly changes the master viewcontroller as you would expect in landscape mode. However it does not seem to change the viewcontroller used for the popover in portrait mode.

I notice that the barbuttonitem to show this master view controller is just calling showMasterInPopover: on the splitviewcontroller, and so would expect it to work in portrait mode as well, but it does not.

In fact, I can set the master view controller, see the new viewController correctly in landscape mode, rotate back to portrait, and the viewcontroller used in the popover is still the old one.

Is this a bug?

A: 

I've had this same problem. Still looking for a solution