So to be honest I didn't quite understand what you said there. And it's entirely possible that you didn't understand what I wrote either.
So I'll just try to explain it again and see if that helps?
So your categorias view controller needs to the root controller of your nav controller.
So right now you do this:
Code:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
When it really should be more like this:
Code:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:catViewController];
See how you should specify your categorias controller as your root controller when you create your UINavigationController?
Of course this means you need to do this after you have created your categorias controller.
Then that nav controller needs to be the first tab in your tab bar controller.
So right now you have this:
Code:
tabBarController.viewControllers = [NSArray arrayWithObjects:catViewController, negViewController, sitViewController, favViewController, ranViewController, nil];
but really what you should do is more like this:
Code:
tabBarController.viewControllers = [NSArray arrayWithObjects:navController, negViewController, sitViewController, favViewController, ranViewController, nil];
You see the navController should be first, not the catViewController. That's where your mistake is.
Also, you shouldn't add the navController's view to the window directly. So just delete this line all together:
Code:
[window addSubview:navController.view];
That line needs to go because you're adding your tab bar controller's view to the window instead. That view is what should be the top of the hierarchy.