0

After trying many ways i need to ask this question that is there any way to create tabbar in splitView's rootViewcontroller ( leftside)view. If anybody has some sample code then please post me.

Here is my code but it is not working.It always open detailView and even doesnt split the view..

if([self isPad])
{
    UIViewController  *viewController2,*viewController3,*viewController4;
    rootViewController = [[[CategoryItemsList alloc] init] autorelease];
    viewController2 = [[[SearchList alloc] init] autorelease];
    viewController3 = [[[FavoritesList alloc] init] autorelease];

    viewController4 = [[[Information alloc] init] autorelease];


    self.tabBarController = [[[UITabBarController alloc] init] autorelease];
    NSArray *viewControllers = [NSArray arrayWithObjects:rootViewController, viewController2,viewController3,viewController4,nil];
    //self.tabBarController.viewControllers = [NSArray arrayWithObjects:  rootViewController,viewController2,viewController3,viewController4, nil];
    [tabBarController setViewControllers:viewControllers];
   // self.tabBarController.view=rootViewController.view;

    splitDetail = [[splitDetailView alloc] initWithNibName:@"splitDetailView" bundle:nil];

    UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:tabBarController];

    splitViewController = [[UISplitViewController alloc] init];
    //splitViewController.tabBarItem = controller.tabBarItem;
    splitViewController.viewControllers = [NSArray arrayWithObjects:nav, splitDetail, nil];
    splitViewController.delegate=splitDetail;
    rootViewController.splitView=splitDetail;

}


if([self isPad])
{
    //[window addSubview:splitViewController.view];
    self.window.rootViewController = self.splitViewController;

}
else
{
     [window addSubview:tabBarController.view];   
}
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216
Developer
  • 1,435
  • 2
  • 23
  • 48
  • Refer to my answer here : http://stackoverflow.com/questions/9680532/ipad-splitview-with-tabbar – Parth Bhatt Mar 15 '12 at 07:21
  • YES, it's possible refer this tutorial here [Tutorial](https://github.com/grgcombs/IntelligentSplitViewController) – Hiren Mar 23 '12 at 10:05

0 Answers0