0

I created my UITableViewCellStyleDefault styled cell and set its background image:

cell.backgroundView = imgView;

and it works but the background of the text in the cell is still white.So it hides partially the backgroundView. I have tried:

cell.textLabel.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor clearColor];
cell.textLabel.opaque = NO;

but none of them worked.

Also the image used for backgroundView has transparent parts but in the cell the are not. I wonder what I am missing.

Thanks in advance.

nacho4d
  • 43,720
  • 45
  • 157
  • 240

1 Answers1

0

Refer to this: Changing UITableViewCell textLabel background color to clear

Community
  • 1
  • 1
Nevin
  • 7,689
  • 1
  • 23
  • 25
  • Thanks, that solved the problem, I still wonder setting the background color inside tableView:cellForIndexAtIndexPath: method won't work. – nacho4d Sep 13 '10 at 16:25