【发布时间】:2013-02-14 07:16:49
【问题描述】:
我的应用程序在 iOS5 中运行良好,但当我切换到 iOS6 时,由于 UIViewControllerHierarchyInconsistency 而崩溃。
错误如下所示:
UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UILayoutContainerView: 0xa148de0; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0xa148ea0>> is associated with <UITabBarController: 0xa64af30>. Clear this association before associating this view with <lkViewController: 0xa33faa0>.'
我查看了 stackoverflow 上的一些解决方案,它告诉我删除视图控制器。但是当我删除 tabbarcontroller 时,视图显示不正确。
我的 xib 文件如下所示:
在这方面需要一些指导..谢谢...
编辑:
崩溃出现在 lkViewController 中的这一行:
self.view = m_tabBarController.view;
当 m_tabBarController 是 UITabBarController 时。
【问题讨论】:
-
什么是
lkViewController,您在哪里使用它?您要么错误地将某些东西连接到其视图出口,要么将错误的视图设置为其视图属性。 -
lkViewController 是一个 UIViewController...
标签: ios ios6 uitabbarcontroller