Answers for "uitableview cell color change for selection"

1

change selection color uitableviewcell swift

override func setSelected(_ selected: Bool, animated: Bool) {
     super.setSelected(selected, animated: animated)

     if selected {
         contentView.backgroundColor = UIColor.green
     } else {
         contentView.backgroundColor = UIColor.blue
     }
 }
Posted by: Guest on July-27-2020

Code answers related to "uitableview cell color change for selection"

Code answers related to "Swift"

Browse Popular Code Answers by Language