Swift 3
Option 1: (which I always use)
To cancel the animation after grayscale, you can do this:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) }
Option 2:
To completely remove the highlight effect, you can add this line to your cellForRowAt :
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = ..... cell.selectionStyle = .none return cell }
source share