方法如下:
-
(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;
}

相关文章:

  • 2022-12-23
  • 2021-09-09
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案