iphone - How to include tabbar and navigation controller in single app? -
How to create a tabbar controller and navigation bar controller in a window-based app? I am trying to include both controllers.
You can do this as follows ... Create a project of navigation Create Controller. Then in AppDelegate Create a Tabbranch Controller. One of the array viewcontrollers is as follows ...
mTabBar = [[UITabBarController alloc] init]; NSMutableArray * Local ViewControllersArray = [[NSMutableArray alloc] initWithCapacity: 3]; TSDetailTaskController * m SSLetailTaskController = [[TSDetailTaskController alloc] initWithNibName: @ "TSDetailTaskController" bundle: zero]; UINavigationController * mTaskNavBar = [[UINavigationController alloc] initWithRootViewController: m SSLetailTaskController]; MTaskNavBar.tabBarItem.title = @ "Job List"; MTaskNavBar.tabBarItem.image = [UIImage imageNamed: @ "glyphicons_114_list.png"]; [MTSTTT Controller Release]; MTSSearchController = [[TSSearchController alloc] initWithNibName: @ "TSSearchController" bundle: zero]; UINavigationController * mSearchNavBar = [[UINavigationController alloc] initWithRootViewController: mTSSearchController]; MSearchNavBar.title = @ "Search"; MSearchNavBar.tabBarItem.image = [UIImage imageNamed: @ "glyphicons_009_search.png"]; [MTSSearchController release]; TSSettingController * mTSSettingController = [[TSSettingController alloc] initWithNibName: @ "TSSettingController" bundle: zero]; UINavigationController * mSettingNavBar = [[UINavigationController alloc] initWithRootViewController: mTSSettingController]; MSettingNavBar.tabBarItem.title = @ "Settings"; MSettingNavBar.tabBarItem.image = [UIImage imageNamed: @ "glyphicons_280_settings.png"]; [MTSSettingController release]; [Local ViventerolSoundAdd object: Metscanbar]; [LocalViewColorsArrayAdd Object: MSACNNBRR]; [LocalViewConverterArrowAdd Object: AmazingNabber]; [MTaskNavBar release]; [MSearchNavBar release]; [Messagingbabber release]; MTabBar.viewControllers = Local ViewControllersArray; MTabBar.view.autoresizingMask == (UIViewAutoresizingFlexibleHeight); [Local Wife ControllersAre release]; [Add window subeview: MTBbar. Weave]; [Self. Windows and knowledgeable]; Yes come back Hope this will help you.
Comments
Post a Comment