Swift 3 Eureka Forms 改变按钮行字体颜色

Swift 3 Eureka Forms change button row font color

我正在使用 Swift 3 创建一个 IOS 应用程序并实施 Eureka Forms。作为表单的一部分,我有一个用作删除按钮的按钮行。因此,我希望将文本颜色更改为白色。

我尝试了以下方法,但是单元格文本颜色会引发错误。关于我如何正确实施它有什么想法吗?

+++ Section("Delete Item")
  <<< ButtonRow() {
  [=11=].title = "Delete"
  }.cellSetup() {cell, row in
    cell.backgroundColor = UIColor.red
    cell.textLabel?.textColor = UIColor.whiteColor()
  }.onCellSelection {  cell, row in self.deleteItem() }

你很接近,你必须使用 tintColor 而不是 textColor,请使用此代码

 <<< ButtonRow() {
      [=10=].title = "Delete"
      }.cellSetup() {cell, row in
          cell.backgroundColor = UIColor.red
          cell.tintColor = UIColor.white
      }

希望对您有所帮助