Skip to content

Commit

Permalink
Fix where the user could interact with the views during a gesture
Browse files Browse the repository at this point in the history
  • Loading branch information
kcharwood committed Apr 30, 2014
1 parent aab0fea commit 928f113
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MMDrawerController/MMDrawerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ -(void)panGestureCallback:(UIPanGestureRecognizer *)panGesture{
}
}
case UIGestureRecognizerStateChanged:{
self.view.userInteractionEnabled = NO;
CGRect newFrame = self.startingPanRect;
CGPoint translatedPoint = [panGesture translationInView:self.centerContainerView];
newFrame.origin.x = [self roundedOriginXForDrawerConstriants:CGRectGetMinX(self.startingPanRect)+translatedPoint.x];
Expand Down Expand Up @@ -1044,10 +1045,12 @@ -(void)panGestureCallback:(UIPanGestureRecognizer *)panGesture{
self.gestureCompletion(self, panGesture);
}
}];
self.view.userInteractionEnabled = YES;
break;
}
case UIGestureRecognizerStateCancelled:{
[panGesture setEnabled:YES];
self.view.userInteractionEnabled = YES;
break;
}
default:
Expand Down

0 comments on commit 928f113

Please sign in to comment.