KILabel
KILabel copied to clipboard
Fix issue with indexPath in didSelectRowAtIndexPath when a cell contains KILabel
Related to #30
It looks like copy-paste issue when a chunk of code at the touchesEnded was copied from touchesBegan and after super's touchesEnded super's touchesBegan is being called.
Main.storyboard was updated to make a cell selectable. KILabelTableViewController.m updated with logging so you can check issue.
To reproduce the issue revert my changes in KILabel.m and try the following steps:
- tap first cell - indexPath is 0-0 (correct)
- tap second cell - indexPath is still 0-0 (wrong)
- tap second call again - indexPath is 0-1 (correct)
- tap first cell - indexPath is 0-1 (wrong)
- tap first cell again - indexPath is 0-0 (correct)
Hope you will check this PR asap because it's very useful pod.
ADDED: fix for the crash caused by adding nil color to a dict
... and. nothing?
I fixed the issue by removing for following code from "- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event.
else { [super touchesBegan:touches withEvent:event]; }
I guess the author copied code from "- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event" by mistake.
@mobilefellow thank you. I have just wasted two hours on this, taking my project (quite large) apart and going more crazy every minute. It was one of the most bizarre and random bugs I have seen this year. I'm so happy it works now.