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.