Does anyone know how to change the background color of a cell using UITableViewCell, for each selected cell? I created this UITableViewCell inside the code for TableView.
override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) if selected { self.contentView.backgroundColor = .black } else { self.contentView.backgroundColor = .white } }