1

how to change the background color of header in UITableView. But it should only for on showing headers. I implemented the following delegate

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
}

But it gets applied for all the rows.like i have A and its content then E and its content.But there is a long gap between A and E.

Fry
  • 6,235
  • 8
  • 54
  • 93
priyanka vijesh
  • 227
  • 1
  • 3
  • 7

1 Answers1

0

If you are talking about the UIvew for the Header of the table view which appears at the top of th stable view and does not scroll with the table cells you need to create UIVIew and set its background then appley this view as tableviewHeader property of the tableview

 self.tableView.tableHeaderView = [[UIView alloc] init];......
Ilker Baltaci
  • 11,644
  • 6
  • 63
  • 79