【发布时间】:2014-02-04 05:51:02
【问题描述】:
我的应用程序没有从当前状态开始,如果不关闭我的应用程序,我将进入后台。我只是最小化我的应用程序而不是关闭我的应用程序。如果再次启动我的应用程序,它将从启动画面开始。
我想从我最小化我的应用程序的当前状态启动我的应用程序。
我的问题是:
我需要在应用委托类中做些什么,这是我的工作:
-(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();
}
【问题讨论】:
标签: ios