Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make UITableView transparent in IOS7?

I have tried many times and many method to UITableView transparent in IOS7,but it still does not work.I have no any ideas...

"[cell setBackgroundColor:[UIColor clearColor]];"


UIView* bgv = [[UIView alloc] init];
bgv.backgroundColor = [UIColor clearColor];
[cell setBackgroundColor:[UIColor clearColor]];
[cell setBackgroundView:bgv];

cell.backgroundColor = [UIColor colorWithRed:(247.0/255.0)
                                 green:(151.0/255.0)  blue:(121.0/255.0) alpha:.3];

All over these 3 method I've tried,still not work.

Can anybody give some more tips about this problem?

Thanks a lot~

like image 655
voisvous Avatar asked Jul 02 '14 01:07

voisvous


1 Answers

Use this

cell.contentView.backgroundColor = [UIColor clearColor];
        cell.backgroundColor = [UIColor clearColor];
        tableView.backgroundColor = [UIColor clearColor];
like image 88
Sandeep Singh Avatar answered Oct 11 '22 17:10

Sandeep Singh