Skip to content

Commit eafaa6a

Browse files
committed
Removing the swapping of scrollEnabled on and off, replacing it with directionLockEnabled
1 parent 961bc7c commit eafaa6a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

SWTableViewCell/PodFiles/SWTableViewCell.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ - (void)initializer
137137
{
138138
[self.scrollViewContentView addSubview:subview];
139139
}
140+
141+
self.containingTableView.directionalLockEnabled = YES;
140142
}
141143

142144
- (void)layoutSubviews
@@ -152,7 +154,6 @@ - (void)layoutSubviews
152154
self.scrollViewButtonViewRight.layer.masksToBounds = YES;
153155
self.scrollViewContentView.frame = CGRectMake([self leftUtilityButtonsWidth], 0, CGRectGetWidth(self.bounds), self.height);
154156
self.cellScrollView.scrollEnabled = YES;
155-
self.containingTableView.scrollEnabled = YES;
156157
self.tapGestureRecognizer.enabled = YES;
157158
}
158159

@@ -531,7 +532,6 @@ - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoi
531532

532533
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
533534
{
534-
self.containingTableView.scrollEnabled = NO;
535535
self.tapGestureRecognizer.enabled = NO;
536536
if (scrollView.contentOffset.x > [self leftUtilityButtonsWidth])
537537
{
@@ -562,7 +562,6 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView
562562
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
563563
{
564564
self.tapGestureRecognizer.enabled = YES;
565-
self.containingTableView.scrollEnabled = YES;
566565
}
567566

568567
- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
@@ -571,7 +570,6 @@ - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
571570
self.tapGestureRecognizer.enabled = YES;
572571
if (_cellState == kCellStateCenter)
573572
{
574-
self.containingTableView.scrollEnabled = YES;
575573
self.longPressGestureRecognizer.enabled = YES;
576574
}
577575
}

0 commit comments

Comments
 (0)