in iOS 7 viewForHeaderInSection section is starting from 1 not from 0

Just encountered exactly the same issue, and the resolution turns out very simple.

Just implement this delegate method:

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 20;
}

Form Apple UITableViewDelegate Protocol Reference, it mentioned

Discussion

The returned object can be a UILabel or UIImageView object, as well as a custom view. This method only works correctly when tableView:heightForHeaderInSection: is also implemented.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)