From 62e737bd83811c18a68567b45739ff9f67c1dec6 Mon Sep 17 00:00:00 2001 From: Aryan Ghassemi Date: Sun, 27 Oct 2013 16:26:23 -0700 Subject: [PATCH] Fixed #5 Quick swipe should not open menu if delegate is not implemented or returns NO --- SlideMenu/Source/SlideNavigationController.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SlideMenu/Source/SlideNavigationController.m b/SlideMenu/Source/SlideNavigationController.m index 4b2f92c..8935992 100644 --- a/SlideMenu/Source/SlideNavigationController.m +++ b/SlideMenu/Source/SlideNavigationController.m @@ -350,7 +350,6 @@ static SlideNavigationController *singletonInstance; self.draggingPoint = translation; - // if (rect.origin.x > 0) { [self.righMenu.view removeFromSuperview]; @@ -392,7 +391,10 @@ static SlideNavigationController *singletonInstance; } else { - [self openMenu:(velocity.x > 0) ? MenuLeft : MenuRight withDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil]; + Menu menu = (velocity.x > 0) ? MenuLeft : MenuRight; + + if ([self shouldDisplayMenu:menu forViewController:self.visibleViewController]) + [self openMenu:(velocity.x > 0) ? MenuLeft : MenuRight withDuration:MENU_QUICK_SLIDE_ANIMATION_DURATION andCompletion:nil]; } } }