如何在表格视图中将导航栏设置到顶部? [英] How to set the navigation bar to the top in Table View?

查看:34
本文介绍了如何在表格视图中将导航栏设置到顶部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将导航栏设置到故事板界面构建器中表格视图的顶部?可能吗?

How can i set the navigation bar to the top in a Table View within storyboard interface builder? Is it possible?

如果我将导航栏添加到我的表格视图中,我只会在我的记录下获得它!

If i add a navigation bar to my Table View i get it under my records only!

我使用的是 Xcode 4.3.2

I'm using Xcode 4.3.2

推荐答案

您不应该自己添加导航栏.当场景嵌入导航控制器或导航堆栈的一部分时,界面构建器将自动执行此操作.因此,如果您的 tableview 是根控制器,请选择您的场景,然后转到:

You should not add the navigation bar yourself. Interface builder will do that automatically when a scene is embedded into a navigation controller or part of the navigation stack. So if your tableview is the root controller choose your scene and then go to:

编辑器 > 嵌入 > 导航控制器

Editor > Embed in > Navigation Controller

否则,当您将另一个控制器(即堆栈的一部分)的 segue 连接到您的 tableview 控制器时,导航栏将自动添加.

Otherwise the navigation bar will be added automatically when you connect a segue from another controller (that is part of the stack) to your tableview controller.

这篇关于如何在表格视图中将导航栏设置到顶部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆