user1113101
user1113101

Reputation: 955

UITableView - transparent background in iOS 7

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

Answers (4)

Matt Baker
Matt Baker

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

Hot Licks
Hot Licks

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

jfgrang
jfgrang

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

Saurabh Passolia
Saurabh Passolia

Reputation: 8109

Setting tableview backgroundColor to clear color working absolutely fine in iOS 7 chk this
screenshot see those separator lines for the table cells while the tableview is transparent.

Upvotes: 10

Related Questions