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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:34:00+00:00 2026-05-22T20:34:00+00:00

I’m trying to present a TabBarController on top of another TabBarController. My application’s MainWindow.xib

  • 0

I’m trying to present a TabBarController on top of another TabBarController. My application’s MainWindow.xib looks like this:

Files Owner
First Responder
My App App Delegate
Window
TabBarContoller
    +TabBar
    +Nav Controller Subclass (a custom class)
        +Navigation Bar
        +Table View Contoller Subclass (custom class)
        +Tab Bar Item
    +Second View Controller (not yet hooked up)

I’m trying to display a xib file when an item is clicked in the TableView. This xib file has a TabBarController as it’s main view, but when the view displays, the tab bar and navigation bar are both invisible. The code I’m using to display it is:

MyAppAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.customNavController presentModalViewController:customDetailEditViewController animated:YES];

If I use the code below to push the view controller onto the stack, I see the correct navigation bar, but the TabBar from the root view controller is shown instead of the one from the view which has been pushed.

[delegate.customNavController pushViewController:customDetailEditViewController animated:YES];

I even tried removing the TabBarController and manually implementing my own TabBar delegates but the same effect occurs (either no NavigationBar or TabBar, or the NavigationBar/TabBar from the root ViewController).

EDIT: I’ve uploaded the source to http://mi6.nu/tabcontroller.zip . I’d really appreciate it if someone with a bt more experience with iOS could take a look.

EDIT2: The closest I’ve come so far is presenting a modal view controller inside the first tabbar, so my view looks like this:

NavigationBar  
[          ]
[          ] 
[---View---]
[          ] 
[          ] 
TabBar from the pushed view 
TabBar from the root view

To achieve this, I’m using:

UITabBarController *tabBarController = [[UITabBarController alloc] init];

    UIViewController *directionsView = [[UIViewController alloc] init];
    txtDirections = [[UITextView alloc]initWithFrame:CGRectMake(0,0,self.view.frame.size.width, self.view.frame.size.height)]; 
    [directionsView.view addSubview:txtDirections];

    IconPickerViewController *iconPicker = [[IconPickerViewController alloc]init];
    tabBarController.viewControllers = [NSArray arrayWithObjects:recipeDetailEditViewController,directionsView,iconPicker, nil];
    [directionsView release];
    [iconPicker release];

    MyAppAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
    [delegate.rootNavController presentModalViewController:recipeDetailEditViewController animated:YES];

This just complicates everything though, since a) It’s not ideal as I have two tabbars and b) all controls (all of the editing controls) need to be in the TableViewController so their values can be loaded/saved to edit items. It would be much easier if the pushed view could handle loading/saving and appear on top of the root tabs.

Surely this must be possible?

  • 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-22T20:34:01+00:00Added an answer on May 22, 2026 at 8:34 pm

    This was an absolute nightmare, but I eventually got it working by presenting the view modally from the TableViewController when the add button is clicked:

    [delegate.rootController presentModalViewController:recipeDetailEditViewController animated:YES];
    

    delegate.rootController is the root TabBarController
    The XIB file I’m presenting does not have a TabBarController, but rather a UIView, a Navigation bar and a TabBar. This appears to work when presented modally from inside a NavigationController.
    Window Layout

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,

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.