iOS踩过的坑之UITableView的footer和heade
2019-04-24 本文已影响0人
Shaw1211
heightForFooterInSection
以及heightForHeaderInSection
方法中,如果想设置高度为0,不能直接返回0
,可以设置返回0.01
例如
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 0.01;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 0.01;
}