ios - How do I set the background color of the editing accessory of a table view? -


my app's theme color greenish color, has green, table view cell:

enter image description here

the problem when click edit button, little minus sign pops on left of cell , isn't green:

enter image description here

i don't understand why happens. code in cellforrowatindexpath

let cell = uitableviewcell() cell.textlabel?.text = somestuff cell.textlabel?.backgroundcolor = uicolor(red: 0xca / 0xff, green: 1, blue: 0xc7 / 0xff, alpha: 1) cell.contentview.backgroundcolor = uicolor(red: 0xca / 0xff, green: 1, blue: 0xc7 / 0xff, alpha: 1)  // look! here set color of editing accessory! cell.editingaccessoryview?.backgroundcolor = uicolor(red: 0xca / 0xff, green: 1, blue: 0xc7 / 0xff, alpha: 1) return cell 

as can see, i've set green, including text label, background, , editingaccessoryview! thing isn't green! stays white can see above.

is there else have set make green?

you have in tableview:willdisplaycell:forrowatindexpath: method. can this:

func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell {     let cell = uitableviewcell()     cell.textlabel?.text = "mytext"     return cell }  func tableview(tableview: uitableview, willdisplaycell cell: uitableviewcell, forrowatindexpath indexpath: nsindexpath) {     cell.backgroundcolor = uicolor(red: 0xca / 0xff, green: 1, blue: 0xc7 / 0xff, alpha: 1) } 

edit:

here visual result of code above: enter image description here


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -