IOSUITableView手动添加时,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;
}
原文地址:https://www.cnblogs.com/tx8899/p/2940125.html