Hi All,
I've managed to get programmaticaly created tab bar to display necessary views and navbars. That part is ok. However, initially when the tab bar shows up it has only one out of two buttons visible, second button is there, if I click it app goes to corresponding view and displays it correctly, after that button becomes visible.
Here's the code:
Each view controller used here is setting tab bar title in init
For one, tab button always uses the title of the view, which isn't what I need here. If that is the design why have title on tabbaritem?
More importantly why or how to make second button appear on startup?
I've managed to get programmaticaly created tab bar to display necessary views and navbars. That part is ok. However, initially when the tab bar shows up it has only one out of two buttons visible, second button is there, if I click it app goes to corresponding view and displays it correctly, after that button becomes visible.
Here's the code:
Code:
tabController = [[UITabBarController alloc] init];
PjListViewCtl *vc1 = (PjListViewCtl*)[[PjListViewCtl alloc] initWithConMgr:self.connectionMgr style:UITableViewStylePlain];
UINavigationController *tnv1 = [[[UINavigationController alloc] initWithRootViewController:vc1] autorelease];
HiPoListViewCtl *vc2 = (HiPoListViewCtl*)[[HiPoListViewCtl alloc] initWithConMgr:self.connectionMgr style:UITableViewStylePlain];
UINavigationController *tnv2 = [[[UINavigationController alloc] initWithRootViewController:vc2] autorelease];
tabController.viewControllers = [NSArray arrayWithObjects:tnv1,tnv2, nil];
[window addSubview:tabController.view];
[window makeKeyAndVisible];
Code:
self.tabBarItem.title = @TBTTL_STATUS;
More importantly why or how to make second button appear on startup?