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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:48:22+00:00 2026-05-22T22:48:22+00:00

I have searched and searched but as yet still cannot figure this ole problem

  • 0

I have searched and searched but as yet still cannot figure this ole problem out! 🙁

I have in my main.xib a TabBarController that is setup with five viewControllers.

I am trying to get the first viewcontroller to be a nav controller so that if the first tab is selected I can push and pop views into view.

But for the life of me I cannot get this to work?

I tried this in my app delegate didLaunch method:

UITabBarController *tabBarController = [[UITabBarController alloc] init];
tabBarController.delegate=self;
FirstViewController *first = [[FirstViewController alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]];
UINavigationController *firstNav = [[UINavigationController alloc] initWithRootViewController:first];  
NSArray* controllers = [NSArray arrayWithObjects:firstNav, nil];  
tabBarController.viewControllers = controllers;  
[window addSubview:tabBarController.view];

for which I see my view displayed but no buttons appear on the tab bar?

Any tip please?? thnx

  • 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-22T22:48:23+00:00Added an answer on May 22, 2026 at 10:48 pm

    For that, you have to add View Controllers in TabBar programatically. Like below:

    oFirstViewController.title = @"First View";
    oFirstViewController.tabBarItem.image = [UIImage imageNamed:@"ico.png"];
    UINavigationController *myNavigationController1 = [[UINavigationController alloc] initWithRootViewController:oFirstViewController]; 
    tabBarController.viewControllers = [NSArray arrayWithObjects:myNavigationController1, myNavigationController2, myNavigationController3, myNavigationController4, nil];
    

    This way, you have to add remaining view-controller to your tabbar controller.

    Hope it will he helpful to you.

    Let me know in case of any difficulty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched online for a solution, but have yet to find one that
I have searched but can't find why this simple code will fail in Drools
I have searched but could not find the reason for this behavior. I have
I need a CORE that will perform AES-128 Encryption/Decryption. I have searched online but
I have searched this question but didn't get / or understood the answer I
I have searched/Googled around but I'm struggling with the following problem. I am building
i have searched Xcode controls but doesn't found anything that makes a GridView like
I have this problem for a long time now, I have searched the web
I would like your help with something that I have searched a lot but
I have searched a lot about UTF8 decoding, but not found the answer yet.

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.