Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed incorrect rect conversion #163

Merged
merged 2 commits into from
Jan 28, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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);
Expand Down