- (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.
/
auto glview = (__bridge CCEAGLView)(Director::getInstance()->getOpenGLView()->getEAGLView());
auto currentView = [[[[UIApplication sharedApplication] keyWindow] subviews] lastObject];
if (glview == currentView) {
cocos2d::Application::getInstance()->applicationWillEnterForeground();
}
if (CAAgent.isInited) {
[CAAgent onResume];
}
}
这段判断有问题,两个view不会相等,会导致游戏里面所有定时器,动画,停止,假卡死状态,跟Cocos版本无关,iOS13所有版本必现,如果cocos没用放弃iOS的,麻烦处理一下