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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:49:20+00:00 2026-05-31T04:49:20+00:00

This problem has been plaguing me for a little while, but I’ve think I’ve

  • 0

This problem has been plaguing me for a little while, but I’ve think I’ve finally figured out what’s wrong; I think I just need a solution now…

Here’s the background on the app. There are about 6 different tabs which the user can use, displayed using a UITabBarController. Each of these tabs is a custom UIViewController subclass, inside a UINavigationController. All 6 tabs are set up inside a nib file (MainWindows.xib).

I need to be able to hide and show different tabs depending on if the user is logged on or not, and who they’re logged into. I have this working like so:

On app launch (application: didFinishLaunching: …), the six tabs are stored into a NSMutableArray which I have. This works fine…

When a user logs in or out, I access the tabs that (s)he can use from the NSMutableArray and add them to the UITabBarController like so:

[tabBar setViewControllers: [NSArray arrayWithObjects:
                                      [viewControllers objectAtIndex:1],
                                      [viewControllers objectAtIndex:5],
                                      nil] animated:YES];

viewControllers is the NSMutableArray which I made earlier with the 6 tabs. Doing NSLog on it just after I create it gives this, which is what I expect:

2012-02-24 11:45:57.690 [redacted][26155:207] (
    "<UINavigationController: 0x8249db0>",
    "<UINavigationController: 0x841a3f0>",
    "<UINavigationController: 0x824be40>",
    "<UINavigationController: 0x824dbd0>",
    "<UINavigationController: 0x824e810>",
    "<UINavigationController: 0x841dfb0>"
)

However, when I print the value of self.parentViewController from the last custom view controller, which is inside the last navigation controller in that list, I get this:

2012-02-24 11:54:51.247 [REDACTED][26306:207]  <UIMoreNavigationController: 0x826ab00>
2012-02-24 11:54:51.248 [REDACTED][26306:207]  <UITabBarController: 0x8257c50>

The first line is self.parentViewController, the second is self.parentViewController.parentViewController

This seems to indicate the heirachy is:

UITabBarController -> UIMoreNavigationController -> MyCustomController

However when I print [self.parentViewController.parentViewController viewControllers]

I still get:

(
    "<UINavigationController: 0x8259770>",
    "<UINavigationController: 0x825aa60>",
    "<UINavigationController: 0x825bec0>",
    "<UINavigationController: 0x82612c0>",
    "<UINavigationController: 0x8261ec0>",
    "<UINavigationController: 0x8263b00>"
)

Where’s the UIMoreNavigationController gone? Can anyone explain what’s going on? I’m encountering problems related to this because I use that array, however the last UINavigationController is not the object it claims to be.

I have a hunch that apple is fiddling with the objects behind the scenes in order to make it easier for the programmer…

I’ll try and reply to any questions you have with how the code is structured, how I use different objects, or to test some code. Thank you very much 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-31T04:49:21+00:00Added an answer on May 31, 2026 at 4:49 am

    Actually the moreViewController of the Tabbar IS a UIMoreNavigationController. (You can have a look at the private header on GitHub)

    As the documentation states, the viewController property only contains the viewControllers, which you have added to the tabbar: You must also not look for the More navigation controller in the array of view controllers stored in the viewControllers property. The tab bar controller does not include the More navigation controller in that array of objects.

    See documentation here: UITabbarViewController.

    Anyway i don’t understand, what your problem exactly is. If you need to access the UIMoreNavigationController do it via the moreNavigationController property of the UITabBarViewController.

    But the ‘viewControllers’ property always only holds those ViewControllers, that you have added to the TabBar.

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

Sidebar

Related Questions

This problem has been solved before, but I'm just not getting it with examples
This problem has been solved before, but I'm just not getting it with examples
This Jquery problem has been bugging me for a while now. I developed a
you will think: "This problem has been solved many, many times. So why doesn't
This has been plaguing me for a while. I have a page in my
This problem has been bugging me for a while. I have to load a
This problem has been afflicting me for quite a while and it's been really
This problem has been getting at me for a while now. Is there an
this problem has been bothering me for days and I cannot figure out why
I am sure this problem has been asked before but I cannot seem to

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.