views:

210

answers:

2

I have a navigationController app.

I push a tabbar onto the view. Tabs are working title is changed, perfect. Now one of my tabs has a list and I try to link out to a child page within the tabbar:

NextViewController *nextController = [[NextViewController alloc] initWithNibName:@"ProfileDetailController" bundle:nil];
[self.navigationController pushViewController:nextController animated:YES];

Nothing happens. Course this works:

self.view = nextController.view;

I want to be able to push to this subpage within my tabbar AND change the navigationbars buttons. Is this possible?

+2  A: 

It sounds like you're pushing a UITabBarController onto a UINavigationController? From Apple's documentation, you can't push a tab bar controller onto a navigation controller.

What you probably want to do is the opposite: have a tab bar controller with UINavigationControllers as the tab items. This is similar to the interface in, say the iPod app or Phone app.

Alex
You are right! I found this and it explained it all. http://www.youtube.com/watch?v=LBnPfAtswgw
A: 

I agree with Alex - a TabBarController inside a navigation controller doesn't seem like a nice UI pattern.

Anyways, to answer your question: Have you tried to access the navigation controller via the tab bar controller?

self.tabBarController.navigationController

I'm not sure if this works, but you could give it a try.

Daniel Rinser