Skip to content

Commit

Permalink
fix mutualmobile#71, fix black screen while excuting closeDrawerAnima…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
BryanOne committed Aug 6, 2013
1 parent 08f720a commit deaa9a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MMDrawerController/MMDrawerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ @interface MMDrawerController () <UIGestureRecognizerDelegate>{
@property (nonatomic, copy) MMDrawerControllerDrawerVisualStateBlock drawerVisualState;
@property (nonatomic, copy) MMDrawerGestureShouldRecognizeTouchBlock gestureShouldRecognizeTouch;
@property (nonatomic, copy) MMDrawerGestureCompletionBlock gestureCompletion;
@property (nonatomic, assign) BOOL isClosingCenterViewController;

@end

Expand Down Expand Up @@ -193,6 +194,10 @@ -(void)closeDrawerAnimated:(BOOL)animated completion:(void (^)(BOOL))completion{
}

-(void)closeDrawerAnimated:(BOOL)animated velocity:(CGFloat)velocity animationOptions:(UIViewAnimationOptions)options completion:(void (^)(BOOL))completion{
if (self.isClosingCenterViewController && animated) {
return;
}
self.isClosingCenterViewController = YES;
CGRect newFrame = self.view.bounds;

CGFloat distance = ABS(CGRectGetMinX(self.centerContainerView.frame));
Expand Down Expand Up @@ -233,7 +238,7 @@ -(void)closeDrawerAnimated:(BOOL)animated velocity:(CGFloat)velocity animationOp
[sideDrawerViewController endAppearanceTransition];
[self setOpenSide:MMDrawerSideNone];
[self resetDrawerVisualStateForDrawerSide:visibleSide];

self.isClosingCenterViewController = NO;
if(completion){
completion(finished);
}
Expand Down

0 comments on commit deaa9a4

Please sign in to comment.