Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7638509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:11:44+00:00 2026-05-31T08:11:44+00:00

I have one tab bar controller to connect with 5 UIViewController. It was connected

  • 0

I have one tab bar controller to connect with 5 UIViewController. It was connected correctly. But I want to make NavigationRootViewController for each UIViewController. How to make them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:11:45+00:00Added an answer on May 31, 2026 at 8:11 am
    - (void)setupViewControllers
    {
        tabBarController = [[UITabBarController alloc] init];
    
    HomeViewController *mainViewController = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil];
    UINavigationController *firstNavController = [[[UINavigationController alloc] initWithRootViewController:mainViewController] autorelease];
    mainViewController.shouldReloadCount = YES;
    [mainViewController release];
    
    MapViewController *currentLocationController = [[MapViewController alloc] initWithNibName:@"MapView" bundle:nil];
    UINavigationController *secondNavController = [[[UINavigationController alloc] initWithRootViewController:currentLocationController] autorelease];
    [currentLocationController release];
    
    FavoritesViewController *favouriteController = [[FavoritesViewController alloc] initWithNibName:@"FavoritesViewController" bundle:nil];
    UINavigationController *thirdNavController = [[[UINavigationController alloc] initWithRootViewController:favouriteController] autorelease];
    
    [favouriteController release];
    
    AllNotificationsViewController *notifController = [[AllNotificationsViewController alloc] initWithNibName:@"AllNotificationsViewController" bundle:nil];
    UINavigationController *fourthNavController = [[[UINavigationController alloc] initWithRootViewController:notifController] autorelease];
    [notifController release];
    
    
    SettingsViewController *settingsController = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:nil];
    UINavigationController *fifthNavController = [[[UINavigationController alloc] initWithRootViewController:settingsController] autorelease];
    
    [settingsController release];
    
    
    tabBarController.viewControllers = [NSArray arrayWithObjects:firstNavController, secondNavController, thirdNavController,fourthNavController,fifthNavController, nil];
    firstNavController.tabBarItem.image = [UIImage imageNamed:@"house.png"];
    firstNavController.tabBarItem.title = @"Home";
    
    secondNavController.tabBarItem.image = [UIImage imageNamed:@"map.png"];
    secondNavController.tabBarItem.title = @"Locator";
    
    thirdNavController.tabBarItem.image = [UIImage imageNamed:@"fav.png"];
    thirdNavController.tabBarItem.title = @"Favorites";
    
    fourthNavController.tabBarItem.image = [UIImage imageNamed:@"profile.png"];
    fourthNavController.tabBarItem.title = @"Activities";
    
    fifthNavController.tabBarItem.image = [UIImage imageNamed:@"settings.png"];
    fifthNavController.tabBarItem.title = @"Settings";
    
    //[self.view addSubview:tabBarController.view];
    [[[UIApplication sharedApplication].windows objectAtIndex:0] addSubview:tabBarController.view];
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have one tab bar controller with 4 navigation controller connection 4 tab bar
In a tab bar based application, If I have one controller pushed in the
I have an application with a tab bar controller and each view contains a
I'm trying to connect Tab Bar Controller to existing part of my app, but
I make iphone application. I use for root controller tab bar controller. One of
I have a tab bar controller with 3 tabs. In one of the tabs,
I want 2 navigation Controller to be attached to one Tab bar item. Basically
I have a Tab Bar Controller with 4 Items. In the 4 one I
If have a Navigation Bar and a Tab Bar in one of my views.
I have a tab contol with two tabs. Each one containing listviews. When the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.