VAAA
VAAA

Reputation: 15049

How to add image to buttonrow Swift Eureka

Im new to Eureka form framework (Swift 2) and Im trying to set the background color of the cell and also add a left icon like the image below.

enter image description here

My actual code is:

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

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

Any clue?

Upvotes: 2

Views: 1747

Answers (1)

Plastus
Plastus

Reputation: 241

This should work for you:

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

Replace the "0.00" with your desired UIColor RGB settings.

Upvotes: 6

Related Questions