Question

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 displayed on the gray-color(default color) background and not on the white color.Please help me out.Thanks.

Was it helpful?

Solution

cell.backgroundColor=[UIColor clearColor]

This worked fine for me.

OTHER TIPS

table.backgroundColor = [UIColor clearColor]

Marco

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.

cell.backgroundColor = [UIColor clearColor];
cell.backgroundView = nil;
table.backgroundView = nil;

This works for me.

UITableView inherits a 'alpha' property from UIView so try changing that :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top