IOS-UITableView手动添加时,Header Section的背景设置
方法如下:
-(UIView*) tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)section
{
UIView*headerView =[[[UIView alloc] initWithFrame:CGRectMake(0,0, tableView.bounds.size.width,30)] autorelease];
if(section == integerRepresentingYourSectionOfInterest)
[headerView setBackgroundColor:[UIColor redColor]];
else
[headerView setBackgroundColor:[UIColor clearColor]];
return headerView;
}