Reputation: 955
I am checking my app with ios 7 beta. I have set background color of UITableView
to clear color. Its still showing white background.
Is there any other way around to make it transparant?
Upvotes: 24
Views: 23509
Reputation: 3454
In my XCode 5 Storyboard I had to set the background color of the 'View' section on the Table View properties to clear as well.
Upvotes: 1
Reputation: 47699
Believe it or not, the following statement, added to cellForRowAtIndexPath
, will cause iOS 7 to honor the XIB-specified color:
cell.backgroundColor = cell.backgroundColor;
Upvotes: 8
Reputation: 1178
I couldn't make it work but the following worked perfectly :
-(void)tableView:(UITableView *)tableView
willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
[cell setBackgroundColor:[UIColor clearColor]];
}
Upvotes: 11
Reputation: 8109
Setting tableview backgroundColor to clear color working absolutely fine in iOS 7 chk
screenshot see those separator lines for the table cells while the tableview is transparent.
Upvotes: 10