I want to change the color of the text of a labelCell. I tried overriding the willDisplayCell function of the tableView, but it didn't work.
This works:
<<< LabelRow("total"){
$0.title = NSLocalizedString("Total", comment: "")
$0.value = "0.0"
}.cellUpdate({ cell, row in
cell.detailTextLabel?.textColor = .redColor()
})
You can also change it using the defaultCellUpdate class method:
LabelRow.defaultCellUpdate = { cell, row in
cell. detailTextLabel?.textColor = .redColor()
}
Additional info of these functions: http://blog.xmartlabs.com/2015/09/29/Introducing-Eureka-iOS-form-library-written-in-pure-Swift/#fully-customizable
Most helpful comment
This works:
<<< LabelRow("total"){ $0.title = NSLocalizedString("Total", comment: "") $0.value = "0.0" }.cellUpdate({ cell, row in cell.detailTextLabel?.textColor = .redColor() })