views:

57

answers:

1

So I have programatically created a tabbarcontroller that uses navigation controllers(based on Jeff Fithian's example). Now I need to push an additional page onto the navbarcontroller (ie I have clicked on an item on the list) but I can't quite figured out how to get a reference to the navigation controller of the current view from it's view controller.

I went with the programmatic approach, because it was the only way to start out the project that worked, but now I am getting really bogged down.

Any ideas?

I am sure there is a tutorial somewhere that addresses this, but after four days of looking (I am in the middle of the MidAtlantic "snow" emergency) I have found nothing...

A: 

You can find the navigation controller from the view controller with the .navigationController property.

[my_view_ctrler.navigationController pushViewController:other_view_ctrler animated:YES];
KennyTM
This didn't work for me, but it did lead me to the right track. It's crazy trying to understand when you can use dot notation and when you have to use the brackets. This is what worked.[[self navigationController] pushViewController:other_view_ctrler animated:YES];where self was the first view controller...
AJ Henley