i have changed the backgroundColor/backgroundImage of my tableviews sections.
I am using plain tableView.
No worries, get worked without problems with this code:
Set the back color or background image from this code. Here you don't have to calculate for section height, just set in xib.
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *sectionView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width,tableView.sectionHeaderHeight)];
sectionView.backgroundColor = [UIColor greenColor];
return sectionView;
}