如何向 UITableViewController 添加工具栏 [英] How to add a Toolbar to UITableViewController

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

问题描述

我需要在 UITableView 的底部添加一个带有按钮的工具栏.我看到很多网站都说使用 UINavigationController 是一种方式,但是有没有什么选项可以让我在 UITableViewController 中做到这一点?

I need to add a Toolbar with a button in it at the bottom of my UITableView. I see lots of websites saying that using a UINavigationController is the way, but Is there any option that allows me to do this just within the UITableViewController?

推荐答案

是的,在 Storyboard 中选择您的 UITableViewController 并转到 Editor-Embed in-Navigation Controller

Yes, select your UITableViewController in your Storyboard and go to Editor-Embed in-Navigation Controller

然后选择您新创建的 NavigationController 并在其属性检查器中选中显示工具栏"

Then select your newly-created NavigationController and in its Attributes Inspector check "Shows Toolbar"

这篇关于如何向 UITableViewController 添加工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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