I\'m developing an app for iOS5 and up and I don\'t use storyboards or IB. I\'m creating a custom UITabBarController
and in my AppDelegate
I\'m put
Yes, you can. Try something like this code in yourUITabBarController.m:
- (void)viewDidLoad
{
[super viewDidLoad];
NSMutableArray* sectionViewControllers = nil;
NSArray* controllers = [self controllers];
UIViewController* controller = nil;
for (controller in controllers)
{
if (sectionViewControllers == nil)
sectionViewControllers = [NSMutableArray arrayWithCapacity:0];
UINavigationController* navigationController = [[UINavigationController allocWithZone:[self zone]] initWithRootViewController:controller];
navigationController.navigationBarHidden = YES;
[sectionViewControllers addObject:navigationController];
[navigationController release];
}
self.viewControllers = sectionViewControllers;
}
- (NSArray*)controllers
{
if (!_controllers)
_controllers = [NSArray arrayWithObjects:[self tabController1], [self tabController2], nil];
return _controllers;
}
and this in you AppDelegate.m:
self.window.rootViewController = self.yourUITabBarController;