设置页脚高度后,tableView的contentSize不正确

时间:2016-07-18 02:37:22

标签: ios footer

我在这里设置了页脚的高度。

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
NSDictionary *dic = _dataArr[section];
return [YhtCellAdapter adapterHeightOfFooter:[dic[@"type"] integerValue]];}

Here is the picture.(there is a space in the bottom)

1:如果我将高度设置为0.01f,空间将消失。在设置高度后,为什么tableView的contentSize不正确?

2:如果我将UITableViewStyleGrouped更改为UITableViewStylePlain,则空间消失了。但页脚会漂浮在底部,我不知道如何隐藏页脚。

1 个答案:

答案 0 :(得分:1)

设置页脚高度后调用Tableview.layoutIfNeeded()

相关问题