Skip to content

Commit

Permalink
Merge pull request #244 from mutualmobile/interaction_fix
Browse files Browse the repository at this point in the history
Fix where the user could interact with the views during a gesture
  • Loading branch information
kcharwood committed Apr 30, 2014
2 parents aab0fea + 928f113 commit 35091ed
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 35091ed

Please sign in to comment.