对 <GKModalRootViewController: 0xb7e450> 的开始/结束外观转换的不平衡调用

Unbalanced calls to begin/end appearance transitions for lt;GKModalRootViewController: 0xb7e450gt;(对 lt;GKModalRootViewController: 0xb7e450gt; 的开始/结束外观转换的不平衡调用)

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

问题描述

我放弃了这一点,我只是不知道哪里出了问题……这是问题所在:在我使用 Cocos2d 的 iPhone 应用程序中,我通过 viewController 配置了自动旋转;但是,由于当用户在身份验证期间点击创建新帐户"时 Game Center 打开其视图时,此视图不会收到任何触摸,但触摸会转到游戏视图(隐藏在游戏中心视图下).

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).

我已经尝试了所有我想的方法,但是由于我没有找到任何关于此 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...),但我能得到的唯一结果是:- 游戏显示正常,游戏中心正常,但没有自动旋转- 纵向显示游戏(视图控制器只允许横向模式),Game Center ok,没有自动旋转- 游戏不显示(黑屏),Game Center ok

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

而且没有办法让它们一起工作......我唯一的线索是这个主题的标题,开始/结束外观转换的不平衡调用".但是由于我自己不调用 Game Center 视图,所以我不知道如何处理这个......

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...

任何人,有什么想法吗?

Anyone, any idea?

推荐答案

自从升级到 iOS 5.0 后,我在 cocos2d 构建的 App 中显示游戏中心排行榜时遇到了同样的问题.我在其他地方看到过这种情况的引用是由于子视图控制器失去了对父视图控制器的关注,但我也无法验证这一点或在我的应用程序中解决这个问题.

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> 的开始/结束外观转换的不平衡调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:对 <GKModalRootViewController: 0xb7e450> 的开始/结束外观转换的不平衡调用

基础教程推荐