Reputation: 311
I have a to do list app and the user is able to tap onto a cell to cross out the task.
However, when tapping on the cell, for a brief moment, the whole cell goes gray to indicate it has been selected.
Is there any way to completely remove this animation so that when the cell is tapped, it still registers as a tap but there is no selection animation.
So far I just have
tableView.deselectRow(at: indexPath, animated: false)
but the animation flashes up briefly.
Any help would be appreciated :)
Upvotes: 2
Views: 4645
Reputation: 53231
Just set
cell.selectionStyle = .none
and your cell will still be selectable, but you won't see the background colour change
You can also set this in a storyboard.
Upvotes: 12