My app works with tabbarcontroller as root view of the window, where on clicking each tab item loads splitviewcontroller with required views for it. The left and right panes of split views are navigation controllers. Now on any button action or didselectrow in tableview corresponding views are to be loaded in right pane. I succeeded loading views in right pane , but not able to display barbuttonitem when new view controller loaded in right pane of split view.
tabbarcontroller
-->splitviewcontroller
----->Leftpane:navigation controller
--------------->view controllers
----->Rightpane:navigation controller
--------------->view controller
Each Splitview of tab bar wil act like 'iPad Mail app' .
To make the app gernalised, I taken class RootiPadViewController which has the delegate of uisplitviewcontroller and uipopovercontroller which loads alls views in slpitview.
Loaded viewcontroller in right pane of split view as below.
UISplitViewController *splitViewController = (UISplitViewController*)[appDelegate.tabBarController.viewControllers objectAtIndex:tabIndex];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
//[navController pushViewController:viewController animated:YES];
NSMutableArray *array = [[NSMutableArray alloc] init];
[array addObject:[splitViewController.viewControllers objectAtIndex:0]];
[array addObject:navController];
splitViewController.viewControllers = array;
[array release];
Please suggest me why bar button item not displayed when views changed in splitviewcontroller.
App looks as below