Ok this is bizarre and has been bugging me for days now…. I did it correctly (I think) but it
This was all done in the AppDelegate:
//Initialize the controllers
navController = [[UINavigationController alloc]init];
iVacationTabBar = [[UITabBarController alloc] init];
//Define the viewcontrollers
myTools* vc_tools = [[myTools alloc] init];
mySettings* vc_settings = [[mySettings alloc] init];
aboutIVacation* vc_about = [[aboutIVacation alloc] init];
myCurrent *mycurrentpage = [[myCurrent alloc] init];
//Create the array of controllers
NSArray* controllers = [NSArray arrayWithObjects:mycurrentpage, vc_tools,vc_settings, vc_about, nil];
//Add the view controllers to the tab bars:
[iVacationTabBar setViewControllers: controllers animated:YES];
//Push the first view controller to the stack:
[navController pushViewController: mycurrentpage animated:NO];
//Add the tabBar and navController to the window:
[window addSubview:iVacationTabBar.view];
[window addSubview:navController.view];
What am I doing wrong. I cant get any of the elements on the page to work. I have a button on mycurrentpage that is also not working.
Yay!!! Solved the problem from help from another forum post:
I had the lines reversed
I had to add the nav controller’s sub view before the tab bar