hi, I'm still looking for some help with this if anyone has any insight. I have a custom cell with a background view, and a content view that is set to the view for my control- say a button in this case.
I've tried setting the background view's background color to clearColor, setting it's 'Opaque' property to NO, as well as doing the same thing for the content view, and for good measure, creating the button the same way before I set it to be the Cell's content view. After all that, i don't see any change at all, the cell's background still appears white and no part of it is transparent...
Here is some code to show how I set up the custom cell:
Code:
- (id)initWithFrame:(CGRect)aRect reuseIdentifier:(NSString *)identifier
{
if (self = [super initWithFrame:aRect reuseIdentifier:identifier])
{
// turn off selection use
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.backgroundView.backgroundColor = [UIColor clearColor];
self.contentView.backgroundColor = [UIColor clearColor];
self.backgroundView.opaque = NO;
self.contentView.opaque = NO;
}
return self;
}
- (void)setView:(UIView *)inView
{
if (view)
[view removeFromSuperview];
view = inView;
[self.view retain];
self.backgroundView.backgroundColor = [UIColor clearColor];
self.contentView.backgroundColor = [UIColor clearColor];
self.backgroundView.opaque = NO;
self.contentView.opaque = NO;
self.view.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:inView];
[self layoutSubviews];
}
I realize there's a lot of overkill there, but I was trying everything I could think of...