From c184927e8d75badec2dc8a69f81ac93e5b4b0c9f Mon Sep 17 00:00:00 2001 From: Anton Holmquist Date: Tue, 5 Nov 2013 17:21:39 +0100 Subject: [PATCH 1/2] Fixed incorrect rect conversion --- MMDrawerController/MMDrawerController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index d2fd3f4d..2fb20ac0 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -92,7 +92,7 @@ -(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{ if(hitView && self.openSide != MMDrawerSideNone){ UINavigationBar * navBar = [self navigationBarContainedWithinSubviewsOfView:self]; - CGRect navBarFrame = [navBar convertRect:navBar.frame toView:self]; + CGRect navBarFrame = [navBar convertRect:navBar.bounds toView:self]; if((self.centerInteractionMode == MMDrawerOpenCenterInteractionModeNavigationBarOnly && CGRectContainsPoint(navBarFrame, point) == NO) || self.centerInteractionMode == MMDrawerOpenCenterInteractionModeNone){ From 546f029f8dd603e4ac3d742167206f52d424a8f3 Mon Sep 17 00:00:00 2001 From: Anton Holmquist Date: Tue, 5 Nov 2013 17:30:32 +0100 Subject: [PATCH 2/2] Fixed another incorrect rect conversion --- MMDrawerController/MMDrawerController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index 2fb20ac0..e6bf1bba 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -1273,7 +1273,7 @@ -(BOOL)isPointContainedWithinNavigationRect:(CGPoint)point{ CGRect navigationBarRect = CGRectNull; if([self.centerViewController isKindOfClass:[UINavigationController class]]){ UINavigationBar * navBar = [(UINavigationController*)self.centerViewController navigationBar]; - navigationBarRect = [navBar convertRect:navBar.frame toView:self.childControllerContainerView]; + navigationBarRect = [navBar convertRect:navBar.bounds toView:self.childControllerContainerView]; navigationBarRect = CGRectIntersection(navigationBarRect,self.childControllerContainerView.bounds); } return CGRectContainsPoint(navigationBarRect,point);