File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ - (void)commonInit
4242 UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc ] initWithTarget: self action: @selector (panThisCell: )];
4343 panRecognizer.delegate = self;
4444 [self .myContentView addGestureRecognizer: panRecognizer];
45+
46+ [self layoutIfNeeded ];
4547}
4648
4749- (id )init
@@ -329,7 +331,9 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogni
329331 if ([gestureRecognizer isKindOfClass: [UIPanGestureRecognizer class ]]) {
330332 UIPanGestureRecognizer *panGesture = (UIPanGestureRecognizer*)gestureRecognizer;
331333 CGPoint velocity = [panGesture velocityInView: self .myContentView];
332- if (fabsf (velocity.x ) > fabsf (velocity.y )) {
334+ if (velocity.x > 0 ) {
335+ return YES ;
336+ } else if (fabsf (velocity.x ) > fabsf (velocity.y )) {
333337 return NO ;
334338 }
335339 }
You can’t perform that action at this time.
0 commit comments