在表格视图的底部添加按钮 [英] Adding a button at the bottom of a table view

查看:60
本文介绍了在表格视图的底部添加按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有更好的方法在表格视图的底部添加按钮,如下所示?我发现的解决方案涉及在现有节的页眉或页脚内插入按钮,对我来说似乎有点荒谬.

Is there a better way of adding a button at the bottom of a table view as seen below? The solutions I found involved inserting a button inside the header or footer of an existing section, seems kinda hacky to me.

推荐答案

您正在查看的视图是UITableView.如果您有多个条目,则此人的信息将与删除"按钮一起滚动到屏幕之外.将按钮放在表格页脚中将使其与表格一起滚动.表格页脚位于任何部分的外部.

The view you are looking at is a UITableView. If you have several entries, then the info for this person would scroll off the screen along with the "Delete" button. Putting the button in the table footer would allow it to scroll along with the table. The table footer is outside of any section.

如果您的视图没有任何滚动或动态大小的表格视图,则可以将其添加到视图底部.

If your view does not have any scrolling or a dynamic sized table view you could just add it to the bottom of the view.

这篇关于在表格视图的底部添加按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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