Hi,
I'm trying to toggle the color of UITableCell when it is clicked.
Code is below
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
RowCell *cell = (RowCell*) [tableView cellForRowAtIndexPath:indexPath];
[cell toggle];
}
The toggle actually works, except that it seems like it hilight more than 1 cell.
i.e if 10 rows covers the currently visible area, clicking on the first row will hilight row 1, row 11, row 21 etc instead of just row 1 that I clicked.
How can I prevent that from happening?
Thanks,
Tee