I did it like that. I copied this from my App Delegate and it works great. Basically, you add view controllers to the tab bar, and then add the tab bar to the window subtitle.
Create Instance Instance
iVacationTabBar = [[UITabBarController alloc] init];
However, you create views / view controllers:
UINavigationController *rvc_tools = [[UINavigationController alloc] initWithRootViewController: vc_tools]; UINavigationController *rvc_settings = [[UINavigationController alloc] initWithRootViewController: vc_settings]; UINavigationController *rvc_about = [[UINavigationController alloc] initWithRootViewController: vc_about]; UINavigationController *rvc_currentpage = [[UINavigationController alloc] initWithRootViewController: vc_currentpage]; UINavigationController *rvc_backup = [[UINavigationController alloc] initWithRootViewController:vc_backup];
Add controllers to the array:
NSArray* controllers = [NSArray arrayWithObjects: rvc_currentpage, rvc_tools,rvc_settings, rvc_backup, rvc_about, nil];
Define an array of view controllers in the tab bar:
[iVacationTabBar setViewControllers: controllers animated:NO]
Add a tab bar to the window subzone.
[_window addSubview:iVacationTabBar.view]
source share