Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableViewCell clear background - Grouped UITableView

I am trying to display my data in a grouped table as below :

enter image description here

As you can see I have cleared the background view for the table by writing the following code in viewDidLoad :

customerTable.backgroundView = nil;  

Also in my xib I have cleared the background of my table.

In cellForRowAtIndexPath I have set the background color for each table cell.

cell.backgroundColor = [UIColor colorWithRed:255.0/255 green:235.0/255 blue:178.0/255 alpha:1];  

As a result I am getting the above output.

The problem I am facing is the black corners I am getting in every cell. I know it has something to do with background of the cell but nothing is working for me. I also tried to clear the background of cell writing the following code line:

    cell.backgroundView = nil;  
like image 437
Nitish Avatar asked Feb 24 '23 12:02

Nitish


1 Answers

Try

customerTable.backgroundColor = [UIColor clearColor];
customerTable.opaque = NO;
customerTable.backgroundView = nil;
like image 140
Pierre Avatar answered Feb 26 '23 02:02

Pierre