Segev
Segev

Reputation: 19303

Cell in UITableView stays highlighted when popping back to ViewController

I have a ViewController with a UITableView. I select a cell to move to another ViewController but when I'm popping back using [self.navigationController popToRootViewControllerAnimated:NO]; The cell that I selected is still highlighted with blue. The only way to unhighlight it is to select another cell. How can I clear the highlighted blue on selection?

Upvotes: 1

Views: 286

Answers (1)

iDev
iDev

Reputation: 23278

Use deselectRowAtIndexPath: method in your didSelectrowAtIndexPath or so.

 [tableView deselectRowAtIndexPath:indexPath animated:YES];

Upvotes: 2

Related Questions