views:

8

answers:

1

I want to maintain the state of iPhone application just like . i.e. When I do close and re-open the application it should display last visited screen. (The screen from where the application was closed.).

Please suggest the efficient way to achieve this.

Is there any API to get it done.?

Please help.

A: 

You need to save the order of your views in the user defaults using NSUserDefaults. You would normally do that in the app delegate method applicationWillTerminate:.

Then when the app restarts, programmatically load the views in order without any animations. If you use a navigation controller or a tabbar, you can easily load the views invisibly to the user.

TechZen