2016-05-09 66 views
1

Im新的Eureka窗体框架(Swift 2)和Im试图设置单元格的背景颜色并添加左下图标,如下图所示。如何添加图像到buttonrow Swift Eureka

enter image description here

我实际的代码是:

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

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

任何线索?

回答

3

这应该为你工作:

.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") 
} 

与所需的UIColor RGB设置替换了 “0.00”。