如何在UITableView中显示零行的表 [英] how to display a table with zero rows in UITableView

查看:82
本文介绍了如何在UITableView中显示零行的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在动态地将内容加载到UITableView中。如果有数据,表需要显示数据。如果没有数据,表应显示普通页面。但在我的应用程序中,该表显示带有两个分隔线的普通页面。我需要删除此分隔线并显示纯白页。请建议?

I am loading a content into UITableView dynamically. If there is data the table needs to display the data. If there is no data the table should display a plain page. But in my application the table displays the plain page with two separator lines. i need to remove this separator line and display a plain white page. Please Suggest?

任何帮助都将不胜感激!

Any help would be appreciated!

推荐答案

如果你提供页脚的视图然后空行之间的分隔符将消失。

If you provide a view to the footer then the separators between the empty rows will disappear.

UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
myTableView.tableFooterView = view;

这篇关于如何在UITableView中显示零行的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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