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:
the problem when click edit button, little minus sign pops on left of cell , isn't green:
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:
Comments
Post a Comment