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 7737857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:06:48+00:00 2026-06-01T08:06:48+00:00

I have an app that have several views. In one view I would like

  • 0

I have an app that have several views. In one view I would like to add a UITabBarController.

In another app I used this to add the UITabBarController to the rootViewController, but I am not sure if that is even the correct way to do it.

in the .h

@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;

in the .m

@synthesize tabBarController=_tabBarController;
self.window.rootViewController = self.tabBarController;
  • 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-06-01T08:06:50+00:00Added an answer on June 1, 2026 at 8:06 am

    In one of my app i have used this code to set tabbarcontroller in between app

    define tabbar controller in AppDelegate.m

    self.tabBarController = [[UITabBarController alloc] init];
    self.tabBarController.delegate=self;
    self.tabBarController.selectedIndex=0;
    self.tabBarController.delegate=self;
    
    
    - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController{
    //NSUInteger index=[[tabBarController viewControllers] indexOfObject:viewController];
    
      // return YES;
    }
    

    Apply below code where you want to push your controller with tab bar controller

    AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
        UIViewController *viewController1 = [[GeneralViewController alloc] initWithNibName:@"GeneralViewController" bundle:nil];
        UIViewController *viewController2 = [[MiscQuotationController alloc] initWithNibName:@"MiscQuotationController" bundle:nil];
        UIViewController *viewController4 = [[QuotationListController alloc] initWithNibName:@"QuotationListController" bundle:nil];
        UIViewController *viewController5 = [[ChargesViewController alloc] initWithNibName:@"ChargesViewController" bundle:nil];
        UIViewController *viewController7 = [[SalesPartViewController alloc] initWithNibName:@"SalesPartViewController" bundle:nil];
    
        ///   tab button title
        viewController1.title = @"Basic information";
        viewController2.title = @"Misc Quotation";
        viewController4.title = @"Quotation Line";
        viewController5.title = @"Charges";
        viewController7.title = @"Sales Part Stock";
    
        // tab button Images
        viewController1.tabBarItem.image = [UIImage imageNamed:@"general.png"];
        viewController2.tabBarItem.image = [UIImage imageNamed:@"misle.png"];
        viewController4.tabBarItem.image = [UIImage imageNamed:@"history.png"];
        viewController5.tabBarItem.image = [UIImage imageNamed:@"charges.png"];
        viewController7.tabBarItem.image = [UIImage imageNamed:@"shoebox.png"];
    
        delegate.tabBarController = [[UITabBarController alloc] init];
        delegate.tabBarController.selectedIndex = 0;
        delegate.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController4, viewController5, viewController7, nil];
        delegate.tabBarController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
        [self.navigationController pushViewController:delegate.tabBarController animated:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPad app with several segmented controls, including one view with two
I have a folder in my WPF app Images that has several .png files
I have several buttons on my app that are being created dynamically. They are
I have several objects in my app that can become nil at some point
I have written a C# app that runs constantly in a loop and several
The main idea is that I have several worker instances of a Rails app,
I have several small classes that are in a single file in /app/models, similar
For an app that I am writing I need to display several views (in
I have several parts in my app where I use custom table view cells.
In my app I have a xib that has several viewcontrollers and xibs (with

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.