tags:

views:

33

answers:

1

i want to insert come png or some black color in table header

 - (NSString *)tableView:(UITableView *)tblView titleForHeaderInSection:(NSInteger)section {

        //tableView.section.backgroundColor = [UIColor blueColor];






        NSString *sectionName = nil;

        switch(section)
        {
            case 0:
                //cell.imageView.image = [UIImage imageNamed:@"bowl.png"];

                sectionName = [NSString stringWithString:@"."];// some black bar
                break;
}

}

but i cant put anything :(

+1  A: 

Try to use UITableViewDelegate methods instead UITableViewDataSource:

tableView:viewForHeaderInSection:
tableView:heightForHeaderInSection

The returned object for viewForHeader... method can be UILabel or UIImageView.

kpower