views:

156

answers:

1

I am working my way through the book "Beginning iPhone Development" and understand the basic view push concept. However Apple's iPhone UI design guide states that I should re-open my application at the previous app-exit view. How can I boot a NavigationController so that it defaults to a child view and yet has a view stack that returns to the application's root view?

By analogy with the iPhone email app, 80% of the time my users would start at an inbox child view but will need to navigate up to an "overview" root view at times.

A solution?

I thought the animated property of pushViewController() just controlled the visual effect of a view open but the docs state "Pass NO if you are setting up a navigation controller before its view is displayed". I hope this means I can push hidden views into the controller's stack up to the default app-open view and then animate the final view display?

+1  A: 

You would probably have to store the stack somewhere and go to the proper view on launch.

That being said, you don't have to do this. It only makes sense for some applications.

See also: Preserving application state across restarts

Can Berk Güder