When I create four navigation controllers and add them to a UITabBar like so:
// Create the root view controllers for the tab bar
firstViewController = [[FirstViewController alloc] init];
secondViewController = [[SecondViewController alloc] init];
thirdViewController = [[ThirdViewController alloc] init];
fourthViewController = [[FourthViewController alloc] init];
// Configure the tab bar
UITabBarController *tabBarController = [[[UITabBarController alloc] init] autorelease];
tabBarController.viewControllers = @[
[[[UINavigationController alloc] initWithRootViewController:firstViewController] autorelease],
[[[UINavigationController alloc] initWithRootViewController:secondViewController] autorelease],
[[[UINavigationController alloc] initWithRootViewController:thirdViewController] autorelease],
[[[UINavigationController alloc] initWithRootViewController:fourthViewController] autorelease]
];
tabBarController.selectedIndex = 1;
self.window.rootViewController = tabBarController;
I'm having an issue where which ever UINavigationController is first visible on launch (in this case index 1) has a strange 'pop' animation. The title and such in the nav bar animate properly, but the content of the navigation controller changes without animation.
Selecting a different tab, and then returning to the original tab corrects the problem.
Also if I set self.window.rootViewController
to [[[UINavigationController alloc] initWithRootViewController:secondViewController] autorelease]
so as to leave the tab bar out of the equation, the navigation controller works just fine.
Any thoughts?