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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:17:03+00:00 2026-05-23T21:17:03+00:00

Is it just me or literally ALL the examples that I have seen on

  • 0

Is it just me or literally ALL the examples that I have seen on the web for uitabbarcontroller require modifying the appDelegate? What if the tabbar comes later on in the app and there are some other screens before? Can someone explain this or point to an example where the first screen of the app is NOT a tabbar view? I am getting nuts from this and cant seem to be able to have the tabbar to work if not from the AppDelegate.

Thanks!!!

UPDATE:

So I am doing this in one of my view controllers in a method that triggers once you click on a button to move to the next screen (which is the tab bar view). It crashes during the execution:

  self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIViewController *viewController1 = [[FirstView alloc] initWithNibName:@"FirstView" bundle:nil];
UIViewController *viewController2 = [[SecondView alloc] initWithNibName:@"SecondView" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil]; //CRASHES HERE
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];

Any idea why? Thanks!!

It crashes in this line:

self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil]; //CRASHES HERE
  • 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-23T21:17:05+00:00Added an answer on May 23, 2026 at 9:17 pm

    You can push the UITabBarController to the navigation controller from any view controller. Doing so may collapse the navigation bars as the view controllers in UITabBarController may themselves contain UINavigationController.

    In order to overcome this navigation bar issue, you need to hide the navigation bar of the current navigation controller from the view controller where you push the tab bar controller. Hide the navigation bar in viewWillDisappear: method of the current view controller.

    - (void)viewWillDisappear:(BOOL)animated {
    
        [super viewWillDisappear:animated];
        [self.navigationController setNavigationBarHidden:YES animated:YES];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am possibly taking over an app that literally just encrypts user passwords by
Just how much slower are events? I have written a streaming XML parser (that
I've got an internationalised web application in which all the text that eventually gets
If a program has literally just deserialized an object (doesn't really matter how, but
I'm just wondering which method is the most effective if I'm literally just wanting
Just looking for the first step basic solution here that keeps the honest people
just a quick question: I am a CS undergrad and have only had experience
In the documentation for com it says that it works literally with every language.
For instance, I want to have a html form that looks like this: <table>
Let's say for example that I have a regular expression like this: The quick

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.