Two UISplitViewControllers, 1 (General) Detailed View

To set the scene, I:

  • Tabbed Tab Controller
  • Each tab has a split view controller
  • I would like to indicate in the Detail view of each Split View Controller SAME view.

I have attached a very simple sample project showing the problem .

Launch it in iPad 5.1 Sim, pay attention to each tab. One shows the general view of the part, one fails.

NSLog debugs reports that there is a NULL verbose view controller on the second split view:

2012-04-28 07: 21: 55.451 svcTest [14597: f803] tabBarController viewControllers = (
    "UISplitViewController: 0x6a36100",
    "UISplitViewController: 0x6a39ab0"
)
2012-04-28 07: 21: 55.455 svcTest [14597: f803] svcA.viewControllers = (
    "UINavigationController: 0x6a36250",
    "UIViewController: 0x6a38720"
)
2012-04-28 07: 21: 55.457 svcTest [14597: f803] svcB.viewControllers = (
    "UINavigationController: 0x6a39cc0"
)

When you click on the second tab, you get this error:

2012-04-28 07: 22: 58.457 svcTest [14597: f803] Splitview controller is expected to have a detail children before its used!
2012-04-28 07: 22: 58.459 svcTest [14597: f803] Split view controller should have its children set before layout!

Looking at the storyboard, I already set out detailed views, so it really bothers me.

Storyboard

Any help in getting this “general” view to display on each tab is greatly appreciated.

Thank!

+5
2

viewController splitViewController, :

self.splitViewController.viewControllers = @[masterNavigationController, detailNavigationController, subViewController];

"subViewController" , .

/ subviews apple :

. , . , 0 , 1.

. UISplitViewController.

+1

, App Delegate -applicationdidFinishLaunchingWithOptions:

viewControllers. , -, , , , :

:

self.splitViewController = [[UISplitViewController alloc] init];
self.splitViewController.viewControllers = [NSArray
                           arrayWithObjects:masterNavigationController,
                           detailNavigationController, nil];
self.splitViewController.delegate = detailViewController;

: , Splitview -

+1

All Articles