Iphone UItableviewcell文本标签背景色问题
在iPad3.2.2中不起作用,但在4.2中效果良好 有人能帮忙清除单元格文本的背景色吗 我的要求是我需要清楚地显示Iphone UItableviewcell文本标签背景色问题,iphone,uitableview,background-color,Iphone,Uitableview,Background Color,在iPad3.2.2中不起作用,但在4.2中效果良好 有人能帮忙清除单元格文本的背景色吗 我的要求是我需要清楚地显示单元格背景视图 提前谢谢 cell.textLabel.backgroundColor = [UIColor clearColor]; 试试这个兄弟,我希望它能在iOS版本中正常工作。我在运行4.3.3的iPad上也遇到了同样的问题 -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell
单元格背景视图
提前谢谢
cell.textLabel.backgroundColor = [UIColor clearColor];
试试这个兄弟,我希望它能在iOS版本中正常工作。我在运行4.3.3的iPad上也遇到了同样的问题
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
[[cell textLabel]setBackground:[UIColor clearColor]];
}
这对我有用
背景色真是一场噩梦!
好运默认情况下,UIKit在选择时将设置所有子视图的背景色
如果您想要不同的子类UITableViewCell,并将此方法添加到子类中:
[cell.textLabel setBackgroundColor:[UIColor grayColor]];
类似:
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
[[self textLabel] setBackgroundColor:[UIColor clearColor]];
[[self detailTextLabel] setBackgroundColor:[UIColor clearColor]];
}