我正在尝试使用以下代码更改单元格的颜色,但是它将所有单元格显示为白色字体,而不是我拥有的金色 rgb 颜色代码。
if (row == 0)
cell.detailTextLabel.text=@"An blah blah";
cell.textLabel.textColor = [UIColor colorWithRed:139 green:136 blue:120 alpha:1];
最佳答案
您将其设置在错误的标签上,这应该有效:
cell.detailTextLabel.text=@"An blah blah";
cell.detailTextLabel.textColor = [UIColor colorWithRed:139/255.0f green:136/255.0f blue:120/255.0f alpha:1];
关于iphone - 更改表格单元格中的 uifont 颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4187940/