UITabBarController in code Not showing navigation bar

J

John

Guest
We have created a UITabBarController in Obj C code using storyboards. It works fine, however the navigation bars do not show on any of the views. Have tried creating the nav bars in the TabBarController and bunch of others things. Most samples do not show nav bars...Any specific code examples would be appreciated, thanks! Here is the VDL code:

- (void)viewDidLoad {
[super viewDidLoad];

UITabBarItem * startTab = [[UITabBarItem alloc]initWithTitle:mad:"Home" image:[UIImage imageNamed:mad:"HomeTab.png"] tag:0];
UITabBarItem * helpTab = [[UITabBarItem alloc]initWithTitle:mad:"Help" image:[UIImage imageNamed:mad:"InfoDarkTab.png"] tag:1];

UIStoryboard * phone = [UIStoryboard storyboardWithName:mad:"MainStoryboard" bundle: nil];
StartListTVC *startVC = [phone instantiateViewControllerWithIdentifier:mad:"StartList"];
HelpWebVC * helpVC = [phone instantiateViewControllerWithIdentifier:mad:"HelpWeb"];

startVC.tabBarItem = startTab;
helpVC.tabBarItem = helpTab;

NSArray *myViewControllers = [[NSArray alloc] initWithObjects:
startVC,
helpVC, nil];

[self setViewControllers:myViewControllers];

[self.navigationController setNavigationBarHidden:NO animated:NO];

}

Continue reading...
 
Top