The fact that the icon of your application appears on the multitasking tab does not mean that your application still exists.
The "multitasking tab" simply displays a list of all running applications.
An easy way to evaluate if the application starts up again when you touch it, follow these steps:
run the application;
close it by pressing the "home" button;
restart the application and check the image that it shows at startup. If this image is your "Default.png" image, the application has been restarted. If you find your application in the state that you left it, the application simply was activated again (i.e. it was in the background).
A more advanced way to see what happens when the application starts is to place the NSLog trace in the application delegation methods:
- (void)applicationDidEnterBackground:(UIApplication *)application { } - (void)applicationWillEnterForeground:(UIApplication *)application { }
If you see printed tracks, this means that the application did not stop when paused.
Conversely, you can put the trace in:
- (void)applicationWillTerminate:(UIApplication *)application { }
if it is called when you press the home button, the application does not enter the background state, rather, it quits.
source share