Table cells do not lose backlight when touched

When I click on a cell, it selects, but it remains blue when touched. I want the blue backlight to remain on touch (but it is important that it stands out first).

This last answer in this post mentions something about willSelectRowAtIndexPath:, but I cannot figure out how to use this to do what I want. Also, I need didSelectRowAtIndexPath:to still be called, I just want the cell not to highlight the touch.

+3
source share
1 answer

Use the following if necessary:

[tableView deselectRowAtIndexPath:indexPath animated:YES];

eg. in didSelectRowAtIndexPath:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
      [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

Deselects the string at the specified pointer path.

clearsSelectionOnViewWillAppear UITableViewController. yes, , . YES.

Reference.

+5

All Articles