Permalink
Browse files

Merge pull request #21 from jon513/bugFixNestedTableViewCells

fix bug where a deeply nested custom UITableViewCell will not work
  • Loading branch information...
2 parents 0099a1d + 47c2870 commit 6cff7a83e7f4963db988109ecadee0cfb8f0460c @andrewroycarter committed Oct 29, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 TimerScroller/TimeScroller.m
View
8 TimerScroller/TimeScroller.m
@@ -399,11 +399,9 @@ - (void)scrollViewDidScroll
CGPoint point = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame));
point = [_scrollBar convertPoint:point toView:_tableView];
- UIView *view = [_tableView hitTest:point withEvent:nil];
-
- if ([view.superview isKindOfClass:[UITableViewCell class]])
- {
- [self updateDisplayWithCell:(UITableViewCell *)view.superview];
+ UITableViewCell* cell=[_tableView cellForRowAtIndexPath:[_tableView indexPathForRowAtPoint:point]];
+ if (cell) {
+ [self updateDisplayWithCell:cell];
if (![self alpha])
{
[UIView animateWithDuration:0.2f delay:0.0f options:UIViewAnimationOptionCurveEaseOut animations:^{

0 comments on commit 6cff7a8

Please sign in to comment.