mskw
mskw

Reputation: 10328

After exiting app, how to go back to the exact same screen where I left off?

Is there a quick and easy way to have the app go back to the same screen after I put it in background mode?

I know there are frameworks just for this stuff, but has anyone done it without much sweat?

Thanks

Upvotes: 1

Views: 315

Answers (3)

Jake M
Jake M

Reputation: 544

In your app delegate, add a line to the applicationDidenterBackground: method that stores the current page via NSUserDefaults.

Then in the applicationWillEnterForeground: method, load up that saved value and restore the page.

Upvotes: 1

rob mayoff
rob mayoff

Reputation: 385600

As of iOS 5.1, there is no quick and easy way.

Upvotes: 1

squarefrog
squarefrog

Reputation: 4822

Multitasking should enable this, while a device has enough memory to keep your app open. Otherwise how about using NSUserDefaults to store a string reference to your view?

Upvotes: 1

Related Questions