< GKModalRootViewController:0xb7e450>开始/结束外观转换的不平衡调用 [英] Unbalanced calls to begin/end appearance transitions for <GKModalRootViewController: 0xb7e450>

查看:161
本文介绍了< GKModalRootViewController:0xb7e450>开始/结束外观转换的不平衡调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我放弃了这一点,我只是不能弄清楚什么是错的,在哪里...
这里是问题:在我的iPhone应用程序使用Cocos2d,我配置自动旋转通过viewController;然而,由于当游戏中心在认证期间用户点击创建新账户时打开其视图,所以该视图不接收任何触摸,而是触摸去到游戏的视图(其隐藏在游戏中心视图下) 。

I give up on that point, I just can't figure out what is wrong and where... Here is the problem: in my iPhone application using Cocos2d, I configured autorotation through a viewController; however, since, when Game center opens its view as the user taps on "Create new account" during the authentication, this view does not receive any touch, but the touch go to the game's view (which is hidden under the Game center view).

我已经尝试了所有我想的,但是由于我没有找到任何回调关于这个游戏中心视图,很难找到一种方法来纠正这个问题。 。

I have tried everything I thought about, but since I did not find any callback about this Game Center View, it is hard to find a way to correct this...

这是游戏视图的初始化:

Here is the initialization of the game's view:

// Init the UI View Controller
// 
viewController = [[SQViewController alloc] initWithNibName:nil bundle:nil];
viewController.wantsFullScreenLayout = YES;

EAGLView *view = [EAGLView viewWithFrame:[window bounds] pixelFormat:kEAGLColorFormatRGBA8 depthFormat:GL_DEPTH_COMPONENT24_OES];
[director setOpenGLView:view];

[director setDeviceOrientation:kCCDeviceOrientationPortrait];

[view removeFromSuperview];
[viewController setView:view];
[window addSubview:viewController.view];
[window makeKeyAndVisible];

我尝试了很多其他的东西,在这段代码中的每一行注释,尝试了其他一些setHidden:NO,bringSubviewToFront ...),但我可以得到的唯一结果是:
- 游戏显示确定,游戏中心确定,但没有自动旋转
- 游戏显示在纵向(视图控制器只允许风景模式),游戏中心确定,没有自动旋转
- 游戏未显示(黑屏),游戏中心确定

I have tried many other things, commented every single line in this code, tried some others (such as setHidden:NO, bringSubviewToFront...), but the only results I could get were: - Game display ok, Game Center ok, but no autorotate - Game displayed in portrait (the view controller only allow landscape modes), Game Center ok, no autorotate - Game not displayed (black screen), Game Center ok

没有办法让它一起工作...我唯一的线索是这个主题的标题,开始/结束外观转换的不平衡调用。但是,由于我不自己调用游戏中心视图,我不知道该怎么办...

And no way to make it all work together... The only clue I have is the title of this topic, "Unbalanced calls to begin/end appearance transitions for ." But since I do not call the Game Center view myself, I don't know what to do with this...

任何人,任何想法?

推荐答案

自从移动到iOS 5.0以来,我在cocos2d内置应用程序中显示游戏中心排行榜时遇到了同样的问题。我已经看到其他地方的引用,这是由副视图控制器失去焦点的父视图控制器,但我已经无法验证或得到这个解决在我的应用程序。

I've had the same problem while displaying game center leaderboards in my cocos2d built App ever since moving up to iOS 5.0. I've seen references elsewhere to this being caused by a sub viewcontroller losing focus on the parent viewcontroller, but I've been unable to verify that or get this resolved in my app either.

好消息是,我已经运行这个仪器 - 没有内存泄漏。也重复执行相同的动作,没有明显的失败或不良影响。

Good news is that I've run this thru instruments - No Memory Leaks. Also executed the same action repetitively with no apparent failures or ill effects.

所以,虽然这个消息是一个烦恼,它不会出现(至少现在)影响应用程序。

So while this message is an annoyance, it doesn't appear (at least for now) to adversely affect the App.

这篇关于< GKModalRootViewController:0xb7e450>开始/结束外观转换的不平衡调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆