I have a UITableViewCell that I have applied CABasicAnimation to when the user does a long press on the cell. If they do this, the cell pulses with color. This works well, but the problem is that when that cell is scrolled out of view and then back it is no longer pulsing. I am assuming this is because that cell has been recycled/reused and doesn’t know it used to be pulsing.
I have tried to store the indexPath of my pressed cell and then pulse the cell again if that scrolls back into view, but it seems to apply it to another cell further down, so that method isn’t foolproof.
How can I make sure that this specific cell doesn’t get reused or changed even when it is scrolled out of view?
So all I needed to do was store the pressed
indexPathin a property then when cells were scrolled back into view I compare my “saved”indexPathwith the current. If they match then I start the pulse animation again: