Reputation: 9
I am new to iPhone development. I have created a window based application in which I use navigation controller for switching from one screen to another.
On one screen I use a viewcontroller for switching to another screen. However, I then need a navigation controller in this screen for switching between screens. But I am unable to switch from one to another.
How can I use a navigation controller in this screen, when the previous screen is switched from a viewcontroller?
Upvotes: 1
Views: 529
Reputation: 8001
You can use a navigation controller to hold your first view also. Just set the navigationBarHidden
to YES, and toggle it when you push your second view controller.
Upvotes: 0
Reputation: 42574
You're not supposed to use nested navigation controllers. You should just keep pushing view controllers to your main navigation controller. You can always access that navigation controller through self.navigationController in your view controllers.
Upvotes: 1