views:

2929

answers:

2

as title, possible to do it?

+2  A: 

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;
}

This was free-handed so forgive any typos, etc..

UPDATE: This only works for 'grouped' tables. Is your table grouped, or normal?

Dutchie432
I think that the returned view needs to be autoreleased, or this will leak.
Kristopher Johnson
A: 

This also works for normal tables. Tried and tested.

Andre