2

我是 Eureka 表单框架(Swift 2)的新手,我试图设置单元格的背景颜色,并添加一个左图标,如下图所示。

在此处输入图像描述

我的实际代码是:

<<< ButtonRow() { (row: ButtonRow) -> Void in
                row.title = "Access"

                }  .onCellSelection({ (cell, row) in
                    self.showAlert()
                })

有什么线索吗?

4

1 回答 1

6

这应该适合你:

.cellSetup { cell, row in
     cell.backgroundColor = UIColor(red:0.00, green:0.00, blue:0.00, alpha: 1.0)
     cell.imageView?.image = UIImage(named: "name_of_image_in_assets")
}

将“0.00”替换为您想要的 UIColor RGB 设置。

于 2016-05-09T14:35:40.827 回答