Skip to content

Instantly share code, notes, and snippets.

@amitittyerah
Created March 26, 2014 10:17
Show Gist options
  • Save amitittyerah/9780286 to your computer and use it in GitHub Desktop.
Save amitittyerah/9780286 to your computer and use it in GitHub Desktop.
Dummy navigation controllers within a tab bar controller
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
self.tabBarController = [[UITabBarController alloc] init];
UIViewController *homeViewController = [[HomeViewController alloc] init];
UINavigationController *homeNavigationController = [[UINavigationController alloc] initWithRootViewController:homeViewController];
self.tabBarController.viewControllers =[NSArray arrayWithObjects:homeNavigationController, nil];
self.window.rootViewController = tabBarController;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment