Ios – Customize UITableView section border color for each section

iosiphoneuitableview

I am using a UITableView with grouping. My first group I have built a custom cell with no background color, and I would also like to remove the border around the cell. How can I do this just for one section?

For my first cell, I would like to set the border/seperator style to [UIColor clearColor].

enter image description here

EDIT: Apple does this in their contacts app, and I wanted to design something similar.

Best Answer

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {

if(indexPath.section == 0){

cell.backgroundView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];

  }
}