带背景图像的UITableViewCell看起来不太好

时间:2010-09-13 15:42:32

标签: iphone uitableview

我创建了我的UITableViewCellStyleDefault样式单元格并设置了它的背景图像:

cell.backgroundView = imgView;

它可以工作但是单元格中文本的背景仍然是白色的。所以它部分隐藏了backgroundView。 我试过了:

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

但他们都没有工作。

用于backgroundView的图像也有透明部分,但在单元格中却没有。 我不知道我错过了什么。

提前致谢。

1 个答案:

答案 0 :(得分:0)