Skip to content

Commit

Permalink
Merge pull request mutualmobile#163 from antonholmquist/original
Browse files Browse the repository at this point in the history
Fixed incorrect rect conversion
  • Loading branch information
kcharwood committed Jan 28, 2014
2 parents 327e049 + 546f029 commit b12cedf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MMDrawerController/MMDrawerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -1286,7 +1286,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);
Expand Down

0 comments on commit b12cedf

Please sign in to comment.