Pressing the exit button on the iPhone take me out of my application, if i tried to go back, i found my self on the latest screen, however, i want that i see the first screen(splash screen) each time i click my application icon.
This happens because your application is prepared to be running in background. For that reason, when you press the "home button", iOS is taking a screen shot of your current application state, so that when you wake up, it will be in the same state as before exiting. To avoid that and make your application star always fresh from the beginning, edit your plist file and set Application does not run in background
key to YES
Set the UIApplicationExitsOnSuspend
in your info.plist file to exit the application. And when relaunched you can start afresh. If you want to save the previous state then you do so in applicationDidEnterBackground
in your app delegate. When you relaunch you can use the variables to set the state of the application before it exited.
精彩评论