How to set table background transparent in iphone?
I am new to iphone development .I have displayed a list of contents in a grouped table view.How can set the table background transparent such as i should see the text disp开发者_如何学Golayed on the gray-color(default color) background and not on the white color.Please help me out.Thanks.
cell.backgroundColor=[UIColor clearColor]
This worked fine for me.
table.backgroundColor = [UIColor clearColor]
Marco
cell.backgroundColor = [UIColor clearColor];
cell.backgroundView = nil;
table.backgroundView = nil;
This works for me.
In iOS 6 seems this is not enough. I have to set both,
menuTable.backgroundColor = [UIColor clearColor];
if ([menuTable respondsToSelector:@selector(setBackgroundView:)]) { // only after 3.2
[menuTable setBackgroundView:nil];
}
self.view.layer.backgroundColor = [UIColor clearColor].CGColor;
Works on iOS 9.
UITableView inherits a 'alpha' property from UIView so try changing that :)
精彩评论