Unbalanced calls to begin/end appearance transitions for lt;UITabBarController: 0x197870gt;(对 lt;UITabBarController: 0x197870gt; 的开始/结束外观转换的不平衡调用)
问题描述
我读到另一位用户遇到类似 错误,但是这个错误是不同的情况.
I read SO about another user encountering similar error, but this error is in different case.
我最初添加视图控制器时收到此消息:
I received this message when I added a View Controller initially:
Unbalanced calls to begin/end appearance transitions for
<UITabBarController: 0x197870>
应用的结构如下:
我有一个 5 选项卡 TabBarController 链接到 5 个视图控制器.在初始显示选项卡中,我调用了一个新的 View Controller 来覆盖作为应用程序的介绍.
I got a 5-tab TabBarController linked to 5 View Controllers. In the initial showing tab, I call out a new View Controller to overlay as an introduction of the app.
我用这段代码来调用介绍视图控制器:
I use this code to call the introduction view controller:
IntroVC *vc = [[IntroVC alloc] init];
[self presentModalViewController:vc animated:YES];
[vc release];
在这个 IntroVC
视图控制器出现后,上面的错误就会出现.
After this IntroVC
view controller shows up, the above error shows.
附言我正在使用 xCode 4.2 &iOS 5.0 SDK,开发 iOS 4.3 应用.
p.s. I am using xCode 4.2 & iOS 5.0 SDK, developing iOS 4.3 app.
推荐答案
没有看到更多的周边代码我无法给出明确的答案,但我有两个理论.
Without seeing more of the surrounding code I can't give a definite answer, but I have two theories.
您没有使用
UIViewController
的 指定初始化器initWithNibName:bundle:
.尝试使用它,而不仅仅是init
.
另外,self
可能是标签栏控制器的视图控制器之一.始终从最顶层的视图控制器呈现视图控制器,这意味着在这种情况下要求标签栏控制器代表视图控制器呈现覆盖视图控制器.您仍然可以将任何回调委托保留给真正的视图控制器,但您必须让标签栏控制器存在并关闭.
Also, self
may be one of the tab bar controller's view controllers. Always present view controllers from the topmost view controller, which means in this case ask the tab bar controller to present the overlay view controller on behalf of the view controller. You can still keep any callback delegates to the real view controller, but you must have the tab bar controller present and dismiss.
这篇关于对 <UITabBarController: 0x197870> 的开始/结束外观转换的不平衡调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:对 <UITabBarController: 0x197870> 的开始/结束外观转换的不平衡调用


基础教程推荐
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01