0

我已经在这个网站上倾注了几个小时试图找到这个问题的答案,但一直无法解决它。问题如下:

我有一个 UITableViewController 使用 push segue 将 a 推UITabBarController送到堆栈上。与UITabBarController4 有关系UITableViewControllers

当我将 segue 更改为模态时,与UITabBarController显示相关的第一个 UITableViewControllers 按预期显示,当然没有导航栏。当我选择 push segue 时,问题是相反的:导航栏出现正确的名称UITabBarController和我创建的自定义按钮......但标签栏和第一个标签的内容都没有显示 - 只是黑色。

当使用推送序列时,我需要做一些特别的事情来显示 UITabBarController 的内容吗?

我已经尝试在 a 中嵌入与 a 相关的一个UITableViews,但这没有任何区别。UITabBarControllerUINavigationController

我当前应用程序的基本结构是:

UIView->(modal segue)->UINavigationController->(relationship)->UITableViewController->(push segue)->UITabBarController->(relationship)[4 UITableViewControllers)

谢谢!

4

1 回答 1

0

实际上,Apple 鼓励用户不要在 Navigationcontroller 中使用 UITabbarcontroller。一个根本不这样做。这就是你得到这种有线行为的原因。尝试重新设计您的应用程序,以便不再需要这样做,或者使用模态 Segue 并在 Tabbarcontroller 中创建一个新的 Navigationcontroller。

还有第三个选项可以创建自定义的 Tabbarcontroller,但我个人不会这样做,因为它也不打算由 Apple 完成,而且工作量很大。

可能还有其他一些解决方案,但我没有找到足够简单的方法来尝试,所以我在我的应用程序中使用了模态 Segue ...

于 2012-02-09T09:53:03.193 回答