0

I have 5 tab bar items. Fifth item is a UISplitViewController. In Potrait mode, on app launch i get to see the detail screen and not the master. I am expecting the master. In landscape mode, master-detail works fine. I add the master-detail to the splitview as below -

ENChromecastNavigationController *master = [[ENChromecastNavigationController alloc] initWithRootViewController:[self p_tabbarVCFromStroyboardName:@"Main" identifier:@"ENMoreViewController" title:@"Me" imageNamed:@"icon-account"]];

ENChromecastNavigationController *detail = [[ENChromecastNavigationController alloc] initWithRootViewController:[self p_tabbarVCFromStroyboardName:@"Main" identifier:@"ENProfileViewController" title:@"Me" imageNamed:@"icon-account"]];

UISplitViewController *splitViewController = [[UISplitViewController alloc]init];

[splitViewController setViewControllers: [NSArray master,detail,nil]];

return splitViewController;

Storyboard has required changes done.

Please help.

Kavitha Pai
  • 51
  • 3
  • 11

1 Answers1

0

Answer is available here - http://nshipster.com/uisplitviewcontroller/

Refer section "Collapse Detail View Controller".

Kavitha Pai
  • 51
  • 3
  • 11