Make UITableView tableHeaderView transparent with all other white cells

My UITableView covers the size of the iPhone view, and tableHeaderView contains additional content. Wanting the title to be clean and the rest of the table to be white, I set the background color of the table to be cleaned, and inside the view delegate method, -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPathI set the background of the cell to white.

This applies to cells with content, but there is another problem: the data for my table does not extend to the bottom, so there are clear mesh cells.

I am just looking for a transparent tableHeaderView and white cells. Am I approaching this wrong? Setting the table background to white and the title for cleaning does not solve the problem.

+3
source share
2

, , -, :

  • UITableView .
  • - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
  • a UIView .
  • a UIView , . tableView.frame.size.height - (rowHeight * numberOfRows + headerHeight)
0

, . tableView [UIColor clearColor], . , , , , clipsToBounds, YES.

0

All Articles