您的位置:首页 > 其它

去掉tableView中多余的分割线

2016-04-15 14:45 211 查看
在做iOS应用开发时,经常遇到tableView数据源为空,或者数据条数很少,空白位置也会出现cell的分割线,看着挺烦人的。

如下:



给footerView和headerView添加一个空白的UIView对象就好了

- 实例

UIView *view =[ [UIView alloc]init];

view.backgroundColor = [UIColor clearColor];

[tableView setTableFooterView:view];

[tableView setTableHeaderView:view];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: