导航栏隐藏
我的导航栏有问题。它没有显示在应有的位置,并且在 Xcode 界面生成器中的“模拟指标”下,“顶部栏”属性设置为“黑色导航栏”。在我的代码中,我还将隐藏属性设置为 false,因此这不应该成为问题。
我的底部确实有一个 UITabBar
,但是,它也包含在“模拟指标”类别中。
I'm having issues with my navigation bar. It isn't showing up where it should, and under "Simulated Metrics" in the Xcode interface builder the "Top Bar" property is set to "Black Navigation Bar". In my code, I also have the hidden property set to false, so that shouldn't be of issue.
I do have a UITabBar
at the bottom, however, that is also accounted for in the "Simulated Metrics" category.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“模拟指标”正如其名称所示:“模拟表示”,与您在代码(或 XCode 界面构建器)中创建(或未创建)的任何对象无关。如果您设置模拟
NavigationBar
为黑色或模拟指标中的任何颜色,这对您的实际项目没有任何意义,因为它只是您实际实现时如何显示的视觉参考(如果您想要一个“真实的项目”) 。 “导航顶栏你必须实现
UINavigationController
,或手动添加UINavigationBar
(通过代码或视觉方式)。The "Simulated Metrics is as it's name indicates: a "simulated representation" that is not connected with any Object that you will have created (or not) in your code (or in the XCode interface builder). If you set the simulated
NavigationBar
to black or whatever color in the simulated metrics, that means nothing to your actual project because it is only a visual reference of how it will be displayed if you actually implement it.If you want to have a "real" navigation top bar you have to implement a
UINavigationController
, or add manually aUINavigationBar
(through code or visually).集成选项卡栏控制器和导航栏控制器的最简单方法是使用代码创建它们。 (这是我最常用的)
希望对你有帮助。
干杯
The simplest way to integrate Tab bar Contrller and Navigation bar controller is by creating them with code. ( That is what i use mostly )
Hope it is helpful for you.
Cheers