mirror of https://github.com/axmolengine/axmol.git
[iOS]fixed #667: call AppDelegate::applicationDidEnterBackground() & AppDeleaget::applicationWillEnterForeground() when application enter background & enter foreground
This commit is contained in:
parent
5e5151b41e
commit
d386116255
|
@ -87,14 +87,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->stopAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->startAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
|
@ -87,14 +87,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->stopAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->startAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
|
@ -1 +1 @@
|
|||
a94593d95f2fff9766c611a35a6593a87d490698
|
||||
a5ce034a4fc47a468b772dcde86d19007b7900b5
|
|
@ -61,14 +61,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->stopAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->startAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
|
@ -62,14 +62,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->stopAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->startAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
|
@ -62,14 +62,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->stopAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->startAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -87,14 +87,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->stopAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->startAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
|
@ -75,14 +75,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->stopAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCDirector::sharedDirector()->startAnimation();
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
Loading…
Reference in New Issue