From e551a99a841ffade8c9a682780995830cfbc7cd1 Mon Sep 17 00:00:00 2001 From: Vyacheslav Kormushkin Date: Fri, 21 Feb 2014 12:59:16 +0400 Subject: [PATCH 1/3] Fixed issue: center view gets truncated if user holds finger on the screen during the device rotation. See https://github.com/mutualmobile/MMDrawerController/issues/204 for reference --- MMDrawerController/MMDrawerController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index a516bf46..98fdfb95 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -743,6 +743,7 @@ -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfac -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{ [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + self.startingPanRect = self.centerContainerView.frame; for(UIViewController * childViewController in self.childViewControllers){ [childViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation]; } From 405dd6622ebbbcfa446e9a3b100525265b4f1635 Mon Sep 17 00:00:00 2001 From: Vyacheslav Kormushkin Date: Fri, 21 Feb 2014 18:28:53 +0400 Subject: [PATCH 2/3] Fixed issue: side view becomes blank black if during panning user taps drawer bar button. Please see https://github.com/mutualmobile/MMDrawerController/issues/204 for reference --- MMDrawerController/MMDrawerController.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index 98fdfb95..d47cd78b 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -743,7 +743,10 @@ -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfac -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{ [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - self.startingPanRect = self.centerContainerView.frame; + if (self.animatingDrawer); + { + self.startingPanRect = self.centerContainerView.frame; + } for(UIViewController * childViewController in self.childViewControllers){ [childViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation]; } @@ -958,6 +961,7 @@ -(void)panGestureCallback:(UIPanGestureRecognizer *)panGesture{ } else { self.startingPanRect = self.centerContainerView.frame; + self.animatingDrawer = YES; } } case UIGestureRecognizerStateChanged:{ @@ -1001,6 +1005,7 @@ -(void)panGestureCallback:(UIPanGestureRecognizer *)panGesture{ } case UIGestureRecognizerStateEnded:{ self.startingPanRect = CGRectNull; + self.animatingDrawer = NO; CGPoint velocity = [panGesture velocityInView:self.childControllerContainerView]; [self finishAnimationForPanGestureWithXVelocity:velocity.x completion:^(BOOL finished) { if(self.gestureCompletion){ @@ -1011,6 +1016,7 @@ -(void)panGestureCallback:(UIPanGestureRecognizer *)panGesture{ } case UIGestureRecognizerStateCancelled:{ [panGesture setEnabled:YES]; + self.animatingDrawer = NO; break; } default: From c59b0b16faa59b3250d04d63bb43b77e58df9ea0 Mon Sep 17 00:00:00 2001 From: Vyacheslav Kormushkin Date: Tue, 27 May 2014 12:44:38 +0400 Subject: [PATCH 3/3] Issue 204:Fixed typo --- MMDrawerController/MMDrawerController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index d47cd78b..975232f6 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -743,7 +743,7 @@ -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfac -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{ [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - if (self.animatingDrawer); + if (self.animatingDrawer) { self.startingPanRect = self.centerContainerView.frame; }