My requirement is that: if the user clicks any row in a section, all the rows in that section need to be highlighted (change background color). I have a custom tableviewcell for this.
I was trying to play with setSelected in the custom tableviewcell, but once you scroll, the cells get reset (obviously).
So, to fix this, in my - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath, I was trying to use [tableView indexPathForSelectedRow].section to retrieve the section, then I was looping through it to select the cells.
The problem ends up being that everytime you scroll, you can kind of notice the cells getting selected which makes it look buggy.
Any suggestions?