Whenever I add an accessoryView to my UITableViewCell, it doesn\'t carry the background color across? I\'m setting a UISwitch as my accessoryView, and the color I have set i
If you want to blend the accessory view background color with the background color of the cell, in iOS8 and Swift this worked like a charm in the tableView(_, cellForRowAtIndexPath:) method:
let color = cell.contentView.backgroundColor
cell.backgroundColor = color