2016-05-09 103 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」。