1.9.3把引擎lView添加在新建UIView上实现背景透明会卡死

我这样操作 实现了游戏背景透明 确实能看到底部添加uiview,(播放视频用)
重点是游戏切换到后台,再打开的时候,整个UI就卡死了…
请问这是什么原因造成的呢??无解呀!希望有大神指点一二

加这两句试试
[rvC addChildViewController:_videoView]
[rvC addChildViewController:_viewController]

试试修改 AppController.mm里的这个函数:

  • (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];
    }
    }
1赞

真的可以哎??这是什么原理呢?真的谢谢啊 我研究了两天被你一下子就搞定了.

1.9.3的一个BUG,当时我们的问题是从第三方SDK返回游戏时发现游戏停止渲染,它这个判断渲染层级的代码不清楚有什么用 -,-

我们游戏修改后没有发现其它问题(app),并且后来从官方Git项目里也找到了同样的修改;

所以最初引擎组是为什么加这个判断就不清楚了 -,-