My app is not starting from current state, without closing my app i am going to push into background. I am just minimizing my app but not closing my app. If again start my app its going to start from starting like from splash screen.
I want start my app from current state where i have minimize my app.
My question is:
What i need to do in app delegate class, here i my work around:
-(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();
}