2
votes

I have a tabbarcontroller with 3 tabs that are splitviewcontrollers. It works fine except when:

  1. in portrait view tap the rootview button to show the master popover.
  2. switch to any other tab
  3. rotate to landscape (the masterview controller of that tab appears)
  4. switch back to first tab and the detail view controller is in the right position (320 px from left border) but instead the master view I have a black screen

I enumerated the splitviewcontroller subviews but the masterview is not there.

If I rotate the device in portrait and back in landscape, the master view appears.

I try to better explain with this picture:

enter image description here

1

1 Answers

0
votes

It seems to me that the problem might be caused by all of your UISplitViewControllers using the same delegate, probably your AppDelegate. That might cause the behavior you're seeing, since when one UISplitViewController returns false from collapseSecondaryViewController:ontoPrimaryController, they all will return false, giving you the padding on the left to make space for the masterViewController. But your UISplitViewControllers which are not active aren't showing the masterViewController, so you get a blank space, instead of what you expect.