我正在尝试更改DecimalRow的文本颜色。 cell.textField上的tintColor和textColor属性似乎都没有做任何事情:
<<< DecimalRow(){
$0.tag = "final";
$0.useFormatterDuringInput = true
let formatter = CurrencyFormatter()
formatter.locale = .current
formatter.numberStyle = .currency
$0.formatter = formatter
}.cellSetup({ (cell, row) in
cell.textField.textColor = UIColor(red:0.15, green:0.55, blue:0.16, alpha:1.0)
cell.textField.tintColor = UIColor(red:0.15, green:0.55, blue:0.16, alpha:1.0)
})
答案 0 :(得分:0)
尝试使用cellUpdate
关闭,它可以正常工作,请看下面的图片
<<< DecimalRow(){
$0.tag = "final";
$0.useFormatterDuringInput = true
let formatter = CurrencyFormatter()
formatter.locale = .current
formatter.numberStyle = .currency
$0.formatter = formatter
}.cellUpdate({ (cell, row) in
cell.textField.textColor = UIColor(red:0.15, green:0.55, blue:0.16, alpha:1.0)
cell.textField.tintColor = UIColor(red:0.15, green:0.55, blue:0.16, alpha:1.0)
})
我希望这能帮到你,最好的问候