I am trying to change the appearance of a custom selected TableViewCell using Swift.
Do I need to do it via the designer or programmatically?
I tried the fol
None of above answers worked, so I try mine and it worked: Here it is:-
func reloadcell() {
if isSelected {
conView.backgroundColor = .yellow
} else if isHighlighted {
conView.backgroundColor = .yellow
} else {
conView.backgroundColor = .clear
}
}
and call that function in layoutsubviews and in your didselect method