本文介绍了Xcode:TabBar未在Interface Builder中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Interface Builder:我有一个连接到三个不同场景的 TabBarController 。每个场景都以 NavigationController 开头,然后有一些不同的 ViewControllers

Interface Builder: I have a TabBarController connected to three different scenes. Every scene starts with a NavigationController and then has some different ViewControllers.

现在的问题是,Interface Builder不再在不同场景中显示 TabBars ,期望在 TabBarController 。我仍然可以在文档大纲中访问 TabBarItems 并且应用程序按预期运行,但它让我感到困惑。

The problem now is, that the Interface Builder is not longer showing the TabBars in the different scenes, expect in the TabBarController. I can still access the TabBarItems in the Document Outline and the app runs as expected, but it confuses me.

如果重要的话,每个场景都会重构为自己的故事板。

Every scene is refactored to its own Storyboard, in case that matters.

提前感谢任何提示!

编辑:我希望这些图片能让问题更清晰。第二张图片中应该有一个TabBar(带有TabBarItem),但没有一个。

Edit: I hope these pictures make the issue more clear. There should be a TabBar (with a TabBarItem) in the second picture, but there isn't one.


推荐答案

您可以告诉IB包含标签栏选择它然后在底部栏下拉列表中的不透明标签栏 >模拟指标。

You can tell IB to include a tab bar in your View Controller by selecting it and then selecting Opaque Tab Bar in the Bottom Bar dropdown, under Simulated Metrics.

这篇关于Xcode:TabBar未在Interface Builder中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 07:25