My application does not start from the current state, without closing my application, I am going to click on the background. I am just minimizing my application but not closing the application. If you run my application again, it will start from the beginning, like with a splash screen.
I want to run the application from the current state where I am minimizing my application.
My question is:
What I need to do in the application delegate class, here I work:
-(void) applicationDidEnterBackground:(UIApplication*)application {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"SplashLoadCheck"];
[[NSUserDefaults standardUserDefaults]synchronize];
if( [navController_ visibleViewController] == director_ )
[director_ stopAnimation];
}
-(void) applicationWillEnterForeground:(UIApplication*)application
{
if( [navController_ visibleViewController] == director_ )
[director_ startAnimation];
}
- (void)applicationWillTerminate:(UIApplication *)application {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"SplashLoadCheck"];
[[NSUserDefaults standardUserDefaults]synchronize]; CC_DIRECTOR_END();
}
source
share