Swift 43,4 and 5
Better practice, write code in UITableViewCell
For example, you have UITableViewCell with the name MyCell, In awakeFromNib just write self.selectionStyle = .none
Full example:
class MyCell: UITableViewCell { override func awakeFromNib() { super.awakeFromNib() self.selectionStyle = .none } }