我创建了我的UITableViewCellStyleDefault样式的单元格并设置其背景图像:
cell.backgroundView = imgView;
它可以工作,但是单元格中文本的背景仍然是白色的,所以它部分隐藏了背景视图。
我尝试过:
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor clearColor];
cell.textLabel.opaque = NO;
但他们都没用。
此外,用于背景视图的图像具有透明部分,但在单元中没有。
我想知道我错过了什么。
事先谢谢。