gpt4 book ai didi

ios - 摆脱单元格文本背景框

转载 作者:行者123 更新时间:2023-12-01 19:24:46 26 4
gpt4 key购买 nike

我有这张 table :

http://i.imgur.com/kFg09.png

如何摆脱文本后面的框?

这是我当前的代码:

    UIColor *CellColor = [UIColor colorWithWhite:0.7 alpha:0.2];
cell.backgroundColor = CellColor;

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

cell.textLabel.font = [UIFont systemFontOfSize:16.0];
cell.textLabel.textAlignment = UITextAlignmentRight;
cell.textLabel.textColor = [UIColor whiteColor];
cell.detailTextLabel.font = [UIFont systemFontOfSize:10.0];
cell.detailTextLabel.textColor = [UIColor whiteColor];

cell.textLabel.text = @"Title text...";
cell.detailTextLabel.text = @"Subtitle text...";

最佳答案

UILabel 的默认背景颜色是白色。所以这是正常的。

如果你想要一个透明的背景,你需要使用:

cell.textLabel.backgroundColor = [ UIColor clearColor ];
detailTextLabel 也是如此

关于ios - 摆脱单元格文本背景框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8289496/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com