简体   繁体   English

Xcode:TabBar不在界面生成器中显示

[英]Xcode: TabBar not showing in Interface Builder

Interface Builder: I have a TabBarController connected to three different scenes. 界面生成器:我有一个TabBarController连接到三个不同的场景。 Every scene starts with a NavigationController and then has some different ViewControllers . 每个场景都以NavigationController开始,然后具有一些不同的ViewControllers

The problem now is, that the Interface Builder is not longer showing the TabBars in the different scenes, expect in the TabBarController . 现在的问题是,界面构建器不再在TabBarController期望的不同场景中显示TabBars I can still access the TabBarItems in the Document Outline and the app runs as expected, but it confuses me. 我仍然可以访问文档大纲中的TabBarItems ,并且该应用程序可以按预期运行,但是这使我感到困惑。

Every scene is refactored to its own Storyboard, in case that matters. 万一重要,每个场景都将重构为自己的情节提要。

Thanks in advance for any hint! 预先感谢您的任何提示!

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. 第二张图片中应该有一个TabBar(带有TabBarItem),但没有一个。

在此处输入图片说明 在此处输入图片说明

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 . 您可以通过选择IB,然后在“ Simulated Metrics下的“ Bottom Bar下拉列表中选择“ Opaque Tab Bar ,告诉IB在视图控制器中包括一个标签栏。

Xcode中的模拟指标

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM