【发布时间】:2016-05-09 08:15:04
【问题描述】:
我的应用程序的主题颜色是绿色,所以一切都必须是绿色的,就像这个表格视图单元格:
问题是当我单击编辑按钮时,单元格左侧会弹出一个小减号,并且不是绿色:
我不明白为什么会这样。这是我在cellForRowAtIndexPath中的代码
let cell = UITableViewCell()
cell.textLabel?.text = someStuff
cell.textLabel?.backgroundColor = UIColor(red: 0xca / 0xff, green: 1, blue: 0xc7 / 0xff, alpha: 1)
cell.contentView.backgroundColor = UIColor(red: 0xca / 0xff, green: 1, blue: 0xc7 / 0xff, alpha: 1)
// Look! here I set the color of the editing accessory!
cell.editingAccessoryView?.backgroundColor = UIColor(red: 0xca / 0xff, green: 1, blue: 0xc7 / 0xff, alpha: 1)
return cell
如您所见,我已将所有内容设置为绿色,包括文本标签、背景,甚至editingAccessoryView!但那东西不是绿色的!如上所示,它保持白色。
我还需要设置什么东西才能让它变成绿色吗?
【问题讨论】:
标签: ios swift uitableview colors