animating a cell when pressed affects other cells

TableviewCells are reused you need to add prepareForReuse Method like :

override func prepareForReuse() {
    super.prepareForReuse()
    self.cardButton.backgroundColor = defaultColor
}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top