KILabel
KILabel copied to clipboard
indexPath in didSelectRowAtIndexPath
I have a tableview where cells display a KILabel, when I tapped a cell (not the kilabel link), I get the wrong indexpath, I get the previous indexPath selected. If I remove the kilabel, everything works like a charm.
The way to "solve" the issue is adding [tableView reloadData] at the end of didSelectRowAtIndexPath.
That doesn't sound right. You really don't want to be reloading the table data after making a selection.
Have you looked at the demo project to see how to use it in a table. I can't imagine why using KILabel would affect selection of table cells.
Yes, I know it doesn't sound right but it was the only way to get KILabel working. I looked at the demo project and all the examples available and all looks right. The thing is, if it was my mistake, why with the reloadData worked? It's a weird thing.
I have exactly the same problem. It seems like a bug.
I ran into this same issue. It has to do with the way touchesBegan/Moved/Ended/Cancelled have been implemented. I was able to resolve the issue by using a UITapGestureRecognizer in lieu of overriding the touch event methods.
@nyeu @vgolovnev @Dayj
in ** - (void)touchesEnded:(NSSet )touches withEvent:(UIEvent *)event * method , line 705, perhaps,
just comment out [super touchesBegan:touches withEvent:event]; or remove it.
It will fix the problem and didSelectRowAtIndexPath works happy again.
Thanks @dayj