views:

34

answers:

1

So I have an app. On the mainWindow I have 1 button. When that button is pushed i want it to open up a completely separate file and start a navigation controller. How can I achieve this all the sample code that I look at base the view controller out of the app delegate.

Basically what I want to do is create something like the facebook application where there is an index of buttons then when one it opens up a navigation controller.

+1  A: 

The app delegate is really the start of the application so it makes sense that the view controller is based there. For each new page you create, you just add on another view. Within that view, you can put the navigation controller or whatever you like.

So in the app delegate files, create an action that connects to your button. Have that action push a new view controller onto the window. Then in the new window, instantiate a navigation controller.

Kennzo