UITableView Transparent
I just want to know how i can set a transparent back开发者_运维技巧ground of an UITableView. I got this :
tableview.backgroundcolor = [UIColor clearColor];
But the cells stay white and not transparent.
Thank for help
Flo.
That statement is correct for setting the tableView's background color to clear (transparent), not the cells.
You have to manipulate cells directly, as they themselves are views. When you set the background color of a table cell however, you are not setting the background color of its content view. So unless you do that specifically, you won't see through the cell. Try this to make transparent the cell background and the cell's contentView background:
cell.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor clearColor];
(Written from memory here, not compiled... :-)
精彩评论