diff --git a/SWTableViewCell/PodFiles/SWCellScrollView.h b/SWTableViewCell/PodFiles/SWCellScrollView.h index 50fe75b..a6ce6c2 100644 --- a/SWTableViewCell/PodFiles/SWCellScrollView.h +++ b/SWTableViewCell/PodFiles/SWCellScrollView.h @@ -10,4 +10,6 @@ @interface SWCellScrollView : UIScrollView +@property (assign, nonatomic) BOOL panDisabled; + @end diff --git a/SWTableViewCell/PodFiles/SWCellScrollView.m b/SWTableViewCell/PodFiles/SWCellScrollView.m index 56b394a..6aaa8a5 100644 --- a/SWTableViewCell/PodFiles/SWCellScrollView.m +++ b/SWTableViewCell/PodFiles/SWCellScrollView.m @@ -13,6 +13,9 @@ @implementation SWCellScrollView - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { if (gestureRecognizer == self.panGestureRecognizer) { + if (self.panDisabled) { + return NO; + } CGPoint translation = [(UIPanGestureRecognizer*)gestureRecognizer translationInView:gestureRecognizer.view]; return fabs(translation.y) <= fabs(translation.x); } else { diff --git a/SWTableViewCell/PodFiles/SWTableViewCell.h b/SWTableViewCell/PodFiles/SWTableViewCell.h index 50b2d11..9c7bd66 100644 --- a/SWTableViewCell/PodFiles/SWTableViewCell.h +++ b/SWTableViewCell/PodFiles/SWTableViewCell.h @@ -36,6 +36,8 @@ typedef NS_ENUM(NSInteger, SWCellState) @interface SWTableViewCell : UITableViewCell +@property (nonatomic, assign) BOOL swipeEnabled; + @property (nonatomic, copy) NSArray *leftUtilityButtons; @property (nonatomic, copy) NSArray *rightUtilityButtons; diff --git a/SWTableViewCell/PodFiles/SWTableViewCell.m b/SWTableViewCell/PodFiles/SWTableViewCell.m index a7c2a2b..e3f24f0 100644 --- a/SWTableViewCell/PodFiles/SWTableViewCell.m +++ b/SWTableViewCell/PodFiles/SWTableViewCell.m @@ -24,7 +24,7 @@ @interface SWTableViewCell ()