Group style tableview, the default first cell starts from 35, need
Add the following code to start from scratch
_tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, mScreenWidth, 0.001)];
As shown in the figure, when the tableHeaderView is set, if not set, estimatedSectionHeaderHeight is only used in the proxy method
Middle configuration height
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 0.01;
}
It is found that the height in the proxy method only works in the first partition
If we need to show normal, we need to add the following code
_tableView.estimatedSectionHeaderHeight = 0.01;
At this time, the display is normal
It can be seen from this that if we need to display the header of the grouped style tableview normally,
It takes three steps
1 _tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, mScreenWidth, 0.001)];
2 _tableView.estimatedSectionHeaderHeight = 0.01
3 Configuration height in proxy method