如何向 UITableViewController 添加工具栏

编程入门 行业动态 更新时间:2024-10-28 16:16:26
本文介绍了如何向 UITableViewController 添加工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我需要在 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 03:17:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1388261.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工具栏   UITableViewController

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!