问题描述
我有一个使用自动布局的故事板项目,设置为任意(大小)和任意(大小)。我嵌入了一个导航控制器(带有第一个viewController)。第一个viewController有一个导航栏(如预期的那样),但第二个viewController没有。它有一个顶部酒吧。我改变了导航控制器navBar的颜色,它们都改变了(如预期的那样)但是我不能添加UIBarButton,或者为第二个viewController创建一个标题。
(请不要在我之前的项目中,当我没有使用自动布局时,(我明确地为iphone制作了),所有viewControllers都有一个导航栏。
请不要太苛刻。我有点新鲜。
更新
刚刚意识到它有顶层布局指南,而不是顶栏
I have a project with the storyboard using auto Layout with the setting w any (size) y any (size). I embedded a navigation controller (with the first viewController). The first viewController has a navigation bar (as expected) but the second viewController doesn't. It has a top bar. I changed the color of the navigation controllers navBar, and they all change (as expected) but I cannot add a UIBarButton, or create a title for the second viewController.
(Please not that in my previous projects, when I didn't use auto layout, (I made it explicitly for the iphone,) all viewControllers had a nav bar.
Please don't be too harsh. I'm kinda new at this.
Update
Just realized it has top Layout guide, not top bar
推荐答案
这篇关于导航栏未显示自动布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!