diff --git a/SWTableViewCell/PodFiles/SWTableViewCell.h b/SWTableViewCell/PodFiles/SWTableViewCell.h index 10d9fab..80922e8 100644 --- a/SWTableViewCell/PodFiles/SWTableViewCell.h +++ b/SWTableViewCell/PodFiles/SWTableViewCell.h @@ -32,7 +32,7 @@ typedef NS_ENUM(NSInteger, SWCellState) - (BOOL)swipeableTableViewCell:(SWTableViewCell *)cell canSwipeToState:(SWCellState)state; - (void)swipeableTableViewCellDidEndScrolling:(SWTableViewCell *)cell; - (void)swipeableTableViewCell:(SWTableViewCell *)cell didScroll:(UIScrollView *)scrollView; - +- (void)swipeableTableViewCell:(SWTableViewCell *)cell didSwipeToState:(SWCellState) state; @end @interface SWTableViewCell : UITableViewCell diff --git a/SWTableViewCell/PodFiles/SWTableViewCell.m b/SWTableViewCell/PodFiles/SWTableViewCell.m index 3daceac..847d0d2 100644 --- a/SWTableViewCell/PodFiles/SWTableViewCell.m +++ b/SWTableViewCell/PodFiles/SWTableViewCell.m @@ -778,7 +778,10 @@ -(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL) { self.tapGestureRecognizer.enabled = YES; } - + if(self.delegate && [self.delegate respondsToSelector:@selector(swipeableTableViewCell:didSwipeToState:)]) + { + [self.delegate swipeableTableViewCell:self didSwipeToState:self.cellState]; + } } #pragma mark - UIGestureRecognizerDelegate