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;//如果沒有會有默認高度
}