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

  • Home
  • SEARCH
  • 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 910471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:02:59+00:00 2026-05-15T17:02:59+00:00

I have a problem building applicatin with tabBarController. There is no problem doing tabBarController

  • 0

I have a problem building applicatin with tabBarController.
There is no problem doing tabBarController with navigationController if I build it from AppDelegate.

But now I have experienced problem when I want to create new view with tabBarController (3 tabs and each has navigation controllers) after a push from previous navigation controller.
It simply doesnt work.

Here is the code:

MainViewController *mainViewController = [[MainViewController alloc] initWithNibName:@"MainView_iPhone" bundle:nil];
mainViewController.tabBarItem.title = @"First";
UINavigationController *mainNavigationController = [[UINavigationController alloc] initWithRootViewController:mainViewController];

DictionariesViewController *dictionariesViewController = [[DictionariesViewController alloc] initWithNibName:@"DictionariesView_iPhone" bundle:nil];
dictionariesViewController.tabBarItem.title = @"Second";
UINavigationController *dictionariesNavigationController = [[UINavigationController alloc] initWithRootViewController:dictionariesViewController];

tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = [NSArray arrayWithObjects:mainNavigationController, dictionariesNavigationController, nil];

[self.navigationController pushViewController:tabBarController animated:YES];

There is a problem after view is pushe to “First” controller. Application crashes…

Please for help.

Regards
Borut

  • 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-15T17:03:00+00:00Added an answer on May 15, 2026 at 5:03 pm

    What are you trying to do with the following code?

    [self.navigationController pushViewController:tabBarController animated:YES];
    

    You said that your app has 3 tabs and each of those tabs have a navigation controller. Therefore, what you should do is to add the navigation controllers to tabBarController.viewControllers (which you did), but then you need to set the tabBarController as the root view controller.

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

Sidebar

Related Questions

I have a kind of basic (but still unresolved) problem. I'm building a program
I have searched/Googled around but I'm struggling with the following problem. I am building
I have a problem with building a project. When I build a project and
Building on this question , now I have another problem. Given this, shipments =
I have a problem with building multi level select box. I have category table
I have a bit of a problem building my project. I'm getting the bellow
I have an old C++ project and I'm having problem building it. For a
I am building multiple forms app in Builder XE2 and I have a problem
I'm building a micro site at the moment and I have a problem. I
I have a problem that is a little hard to explain. I am building

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.