Skip to content

Commit

Permalink
Merge pull request CEWendel#296 from aluong-yammer/master
Browse files Browse the repository at this point in the history
Added a delegate that exposes the scroll state of the cell.
  • Loading branch information
CEWendel committed Mar 8, 2015
2 parents 87cdea0 + 678edf4 commit ebc3dc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions SWTableViewCell/PodFiles/SWTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ typedef NS_ENUM(NSInteger, SWCellState)
- (BOOL)swipeableTableViewCellShouldHideUtilityButtonsOnSwipe:(SWTableViewCell *)cell;
- (BOOL)swipeableTableViewCell:(SWTableViewCell *)cell canSwipeToState:(SWCellState)state;
- (void)swipeableTableViewCellDidEndScrolling:(SWTableViewCell *)cell;
- (void)swipeableTableViewCell:(SWTableViewCell *)cell didScroll:(UIScrollView *)scrollView;

@end

Expand Down
4 changes: 4 additions & 0 deletions SWTableViewCell/PodFiles/SWTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,10 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView
}

[self updateCellState];

if (self.delegate && [self.delegate respondsToSelector:@selector(swipeableTableViewCell:didScroll:)]) {
[self.delegate swipeableTableViewCell:self didScroll:scrollView];
}
}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
Expand Down

0 comments on commit ebc3dc1

Please sign in to comment.