iphonecocoa-touchuinavigationcontrollerbackground-application

Is there a way to change iphone app behavior when it is sent to the background?


Hey guys. I have a navigation-based app, and I want to control what the app does when it enters the background. In this app, the user has usually made it to the 3rd or 4th view controller before hitting the home button.

As of now, pushing the home button forces the user to restart the app from the beginning every time. This is a pain because it takes near a minute for the user to get back to where he was.

Is there a way to "close" the app while keeping track of the user's last page? I know that applicationDidEnterBackground: only allows a few seconds to close-out the session, and I dont know of any other way to accomplish this.

If anyone has any ideas, please let me know. Thanks!


Solution

  • If your app is running on a 4.0+ device then the default behaviour will be to return to where the app was before it entered the background. If it is on an older iOS then you will have save any session information yourself.