UITableView 为 uitableviewstylegrouped 时的一些 注意项
viewForHeaderInSection
TableView 的第一个Section的HeaderView 在未设置heightForHeaderInSection代理时会隐藏
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 20;
}
image.png
viewForHeaderInSection
设置为0 时,依然有默认高度,需要返回0.01或者 CGFLOAT_MIN
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return CGFLOAT_MIN;//如果没有会有默认高度
}