如何在Interface Builder中将导航栏添加到UITableViewController? [英] How do I add a Navigation Bar to a UITableViewController in Interface Builder?

查看:127
本文介绍了如何在Interface Builder中将导航栏添加到UITableViewController?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

界面构建器不允许我单击并将导航栏拖动到表视图控制器上!这是非常令人沮丧的。

Interface builder does not let me click and drag a Navigation Bar onto a Table View Controller!!! It is super frustrating.

我想要的是一个带有编辑按钮的表视图(在interface-builder中完成)。如果这不可能,那么如何以编程方式添加导航栏?

All I want is a table view with an edit button (done in interface-builder). If this is not possible, then how do I add a navbar progammatically?

提前致谢。

推荐答案

从大纲视图中,确保选择表视图控制器

From the outline view, make sure your Table View Controller is selected.

然后转到编辑菜单,然后单击嵌入子菜单,选择导航控制器,然后选择。您的导航控制器指向您的tableview控制器,内置关系。

Then go to the Editor menu, and click on the Embed In submenu, and choose Navigation Controller and voila. You have your navigation controller pointing to your tableview controller with a relationship built in.

这篇关于如何在Interface Builder中将导航栏添加到UITableViewController?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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