I just want to know how i can set a transparent background 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... :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With