Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

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
     }
 }
 
PREVIOUS NEXT
Tagged: #change #selection #color #uitableviewcell #swift
ADD COMMENT
Topic
Name
4+5 =