different height of section header in grouped tableview

4.4k views Asked by At

got a default grouped style table like left screenshot in below, but it looks having different height of section header, the top first is 69 px measured, while those rest are 40 px.

Why? Are they supposed to be same height, aren't they?

So I'd like to make them even by method of tableView:heightForHeaderInSection:, return 40

But.....it looks more worse! It amplifies heights like below middle one, even if putting section title on...like below right pic.

enter image description here

I just wanna have same height of section header. How to make it work?

1

There are 1 answers

0
lucien On

Yea this is strange. I was able to make them even by adjusting the height of the section footers instead:

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 24;
}