I\'ve implemented a custom table view cell class that inherit from UITableViewCell
. The tableview contains a background image, so I want cell\'s background to b
It could be that your UITableViewCell is selected by default.. You can confirm this using Xcode 6s new visual debugger (or find out exactly which view is causing this white cell to appear).
Interestingly, after knowing this.. setting the background color of the selected cell to clear still didn't work.. doing some more research, turns out i just had to modify the selection style when i'm creating this custom cell:
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// do customization here
}
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self setBackgroundColor:[UIColor clearColor]];
return self;
}