Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zachsilvey

macrumors 6502
Original poster
Feb 5, 2008
444
3
Battle Ground
I have been able to successfully create a navigation controller and pass it a root view controller. My problem is when I try to push a new view from inside the root view I am having issues.

say I have a UINavigationController called nav that I initialize, add a root view and add to the window in the app delegate. Then I have an IBAction in the root view class that is supposed to push another view on to the stack I initialize the second view then use

Code:
[self.nav pushViewController:secondLevel animated:YES];

because this is how the Navigation-Based template works.

I know I am doing something wrong OOP wise. Do I need to set up a delegate for the UINavigationController or something?
 
So, you're saying in your RootViewController, you're calling the above line of code? First, are you sure the method it contains is getting called? Second, what is self.nav when you get to this point?
 
Thanks for the input but I figured it out. I don't exactly know what I did but everything is working nicely now. I think I forgot to save Interface Builder before building.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.