当播放完弹出广告之后,会不停的刷新OpenGL error 0x0506,这个因为 广告添加在view界面,而主界面为openGLView,二者在切换时一定要暂停另外一个的刷新
,需要在
RootViewController中添加:
- (void)viewWillDisappear:(BOOL)animated
{
[superviewWillDisappear:animated];
cocos2d::Application::getInstance()->applicationDidEnterBackground();
}
- (void)viewWillAppear:(BOOL)animated
{
[superviewWillAppear:animated];
cocos2d::Application::getInstance()->applicationWillEnterForeground();
}