ios11 UITableView 为group的时候tableFooterView,tableHeaderView问题

来源:互联网 发布:微信公众号 python 编辑:程序博客网 时间:2024/06/06 09:08

ios 中当我设置 UITableView 的Style为UITableViewStyleGrouped 的时候,头视图上面有空白(很大的那种),但是我只是设置了tableFooterView 并没有设置 tableHeaderView ,给我的感觉就是在我设置脚视图的时候,头视图也被设置了而且头设置还有大概20point的高度,但是在iOS10中没有问题,开始设置

_tableView.tableHeaderView = [UIView new];

但是没什么效果,于是我就是直接设置frame,就可以了,

_tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, CGFLOAT_MIN)];

需要注意一下 estimatedSectionHeaderHeight 这个属性,可能会出现section高度的问题

阅读全文
0 0
原创粉丝点击