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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:13:23+00:00 2026-05-26T12:13:23+00:00

Hihi all, I am pretty new in iPhone dev. I have follow some tutorial

  • 0

Hihi all,

I am pretty new in iPhone dev. I have follow some tutorial and created a tabbar application. Below is the code in the appdelegate implementation:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIViewController *viewController1 = [[ViewController1 alloc] initWithNibName:@"ViewController1" bundle:nil];
UIViewController *viewController2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil];

self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil];

self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];

Then set the title and the image for the tab in each of the controller implementation.

My problem is that, example, in my viewController1, I need to navigate to viewController3, when I use presentModalViewController method to push the viewController3 in, the tabbar at the bottom will be disappeared.

While I tried to use the app delegate to refer to my tabBarController, and use tabBarController.navigationController pushViewController method, my viewController3 is not being pushed, and seems nothing happens.

I have tried to follow a few tutorial, but it’s all required to drag in the navigationcontroller into the MainWindow.xib, which, in the xcode 4, MainWindow.xib doesn’t exist anymore. How can i create the navigationcontroller from code so that the app can navigate between different view without hiding the tabbar?

Any comment is very much appreciated! Thanks in advance!

🙂

  • 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-26T12:13:24+00:00Added an answer on May 26, 2026 at 12:13 pm

    If you want to use a navigation controller, you need to create a navigation controller. Since you’re not using a XIB, you’ll have to create it manually.

    Since you want the tab bar to remain visible when you present viewController3, you need to make the navigation controller a child of the tab bar controller.

    UIViewController *viewController1 = [[ViewController1 alloc] initWithNibName:@"ViewController1" bundle:nil];
    UINavigationController *navController1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
    UIViewController *viewController2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil];
    
    self.tabBarController = [[UITabBarController alloc] init];
    self.tabBarController.viewControllers = [NSArray arrayWithObjects:
        navController1,
        viewController2,
        nil];
    

    Then when you want to present viewController3, do this:

    // in some method of viewController1
    [self.navigationController pushViewController:viewController3 animated:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hihi all, I am trying to make use of tabbar control in my iphone
I am very new to C and I have some problems learning about pointers.
Hihi all, I have an NSMutableArray containing various NSDictionary. In each of the NSDictionary,
Hihi all, I have a fixed row tableView with several TextFields in it for
Hihi all, I have a TextField (the TextField is added into the TableViewCell from
Hihi all, I have implement a mechanism for the above (in the question title),
I have a node with some data: <something>Blah blah (Hello World) hihi</something> When I
Can anybody tell me how are exceptions handled in PHP? I have this code
hihi i have a question that i want to ask about c# and window
I have the following HTML: <html> <head> <title> Think in a NEW BOX. </title>

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.