I am creating an IOS app using Swift 3 and implementing Eureka Forms. As part of a form I have a Button Row that is being used as a Delete button. I'm therefore looking to change the text colour to white.
I have tried the following, however cell text colour throws an error. Any thoughts on how I implement this correctly?
+++ Section("Delete Item")
<<< ButtonRow() {
$0.title = "Delete"
}.cellSetup() {cell, row in
cell.backgroundColor = UIColor.red
cell.textLabel?.textColor = UIColor.whiteColor()
}.onCellSelection { cell, row in self.deleteItem() }
you are close, you must use tintColor
instead of textColor
, use this code
<<< ButtonRow() {
$0.title = "Delete"
}.cellSetup() {cell, row in
cell.backgroundColor = UIColor.red
cell.tintColor = UIColor.white
}
I hope this helps you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With