You will need to use
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 30;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *v = [[UIView alloc] init];
[v setBackgroundColor:[UIColor blackColor]];
return [v autorelease];
}
It was free, so forgive any typos, etc.
UPDATE: This only works for "grouped" tables. Is your table grouped or normal?
source
share