From 276dca133bd1085dafd657af4e287e4c5cc81ff8 Mon Sep 17 00:00:00 2001 From: Vitaliy Gozhenko Date: Wed, 1 Apr 2015 04:22:11 +0300 Subject: [PATCH 1/6] fixed Swift compile error (added import UIKit) --- MFSideMenu/MFSideMenuShadow.h | 1 + 1 file changed, 1 insertion(+) diff --git a/MFSideMenu/MFSideMenuShadow.h b/MFSideMenu/MFSideMenuShadow.h index 05cdc26..b8f077f 100644 --- a/MFSideMenu/MFSideMenuShadow.h +++ b/MFSideMenu/MFSideMenuShadow.h @@ -7,6 +7,7 @@ // #import +#import @interface MFSideMenuShadow : NSObject From 76ef70f0558c1e2af2c396d9084fc350b7ff6a6a Mon Sep 17 00:00:00 2001 From: Vitaliy Gozhenko Date: Wed, 1 Apr 2015 05:06:07 +0300 Subject: [PATCH 2/6] Fixed warnings about converting double to float --- MFSideMenu/MFSideMenuContainerViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MFSideMenu/MFSideMenuContainerViewController.m b/MFSideMenu/MFSideMenuContainerViewController.m index 70216e0..818ebf3 100644 --- a/MFSideMenu/MFSideMenuContainerViewController.m +++ b/MFSideMenu/MFSideMenuContainerViewController.m @@ -547,7 +547,7 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceive - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) { CGPoint velocity = [(UIPanGestureRecognizer *)gestureRecognizer velocityInView:gestureRecognizer.view]; - BOOL isHorizontalPanning = fabsf(velocity.x) > fabsf(velocity.y); + BOOL isHorizontalPanning = fabs(velocity.x) > fabs(velocity.y); return isHorizontalPanning; } return YES; From 0f5978af20f331c13081e8cbd34f7484eb3afb83 Mon Sep 17 00:00:00 2001 From: Vitaliy Gozhenko Date: Thu, 2 Apr 2015 19:08:47 +0300 Subject: [PATCH 3/6] removed junk files --- Demos/MFSideMenuDemoAnimations | 1 - 1 file changed, 1 deletion(-) delete mode 160000 Demos/MFSideMenuDemoAnimations diff --git a/Demos/MFSideMenuDemoAnimations b/Demos/MFSideMenuDemoAnimations deleted file mode 160000 index 739cdeb..0000000 --- a/Demos/MFSideMenuDemoAnimations +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 739cdebc8008e0f795f8216488c2197fde43c06a From 653a48edf4e654a32289bbfb2fb22b703a477f58 Mon Sep 17 00:00:00 2001 From: Vitaliy Gozhenko Date: Thu, 17 Sep 2015 00:28:41 +0300 Subject: [PATCH 4/6] fixed Xcode 7 warnings --- MFSideMenu/MFSideMenuContainerViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MFSideMenu/MFSideMenuContainerViewController.m b/MFSideMenu/MFSideMenuContainerViewController.m index 818ebf3..520cb82 100644 --- a/MFSideMenu/MFSideMenuContainerViewController.m +++ b/MFSideMenu/MFSideMenuContainerViewController.m @@ -158,7 +158,7 @@ - (UIStatusBarStyle)preferredStatusBarStyle { #pragma mark - #pragma mark - UIViewController Rotation --(NSUInteger)supportedInterfaceOrientations { +- (UIInterfaceOrientationMask)supportedInterfaceOrientations { if (self.centerViewController) { if ([self.centerViewController isKindOfClass:[UINavigationController class]]) { return [((UINavigationController *)self.centerViewController).topViewController supportedInterfaceOrientations]; From 0d4cbcbefdd89e53bcc2336be4cd6eb08ab0939b Mon Sep 17 00:00:00 2001 From: Vitaliy Gozhenko Date: Thu, 24 Sep 2015 18:14:44 +0300 Subject: [PATCH 5/6] fixed problem with not updating userInteractionEnabled for old centerViewController --- MFSideMenu/MFSideMenuContainerViewController.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MFSideMenu/MFSideMenuContainerViewController.m b/MFSideMenu/MFSideMenuContainerViewController.m index 520cb82..c56bb0b 100644 --- a/MFSideMenu/MFSideMenuContainerViewController.m +++ b/MFSideMenu/MFSideMenuContainerViewController.m @@ -220,6 +220,7 @@ - (void)setLeftMenuViewController:(UIViewController *)leftSideMenuViewController } - (void)setCenterViewController:(UIViewController *)centerViewController { + [self setUserInteractionStateForCenterViewController:YES]; [self removeCenterGestureRecognizers]; [self removeChildViewControllerFromContainer:_centerViewController]; @@ -351,7 +352,7 @@ - (void)setMenuState:(MFSideMenuState)menuState completion:(void (^)(void))compl void (^innerCompletion)() = ^ { _menuState = menuState; - [self setUserInteractionStateForCenterViewController]; + [self setUserInteractionStateForCenterViewController:(menuState == MFSideMenuStateClosed)]; MFSideMenuStateEvent eventType = (_menuState == MFSideMenuStateClosed) ? MFSideMenuStateEventMenuDidClose : MFSideMenuStateEventMenuDidOpen; [self sendStateEventNotification:eventType]; @@ -710,16 +711,18 @@ - (void)centerViewControllerTapped:(id)sender { } } -- (void)setUserInteractionStateForCenterViewController { +- (void)setUserInteractionStateForCenterViewController:(BOOL)state { // disable user interaction on the current stack of view controllers if the menu is visible if([self.centerViewController respondsToSelector:@selector(viewControllers)]) { NSArray *viewControllers = [self.centerViewController viewControllers]; for(UIViewController* viewController in viewControllers) { - viewController.view.userInteractionEnabled = (self.menuState == MFSideMenuStateClosed); + viewController.view.userInteractionEnabled = state; } } } + + #pragma mark - #pragma mark - Center View Controller Movement From d874549367667d7de588767a8eac319288e68ac9 Mon Sep 17 00:00:00 2001 From: Vitaliy Gozhenko Date: Tue, 29 Sep 2015 23:31:52 +0300 Subject: [PATCH 6/6] fix centerViewController layout issue when MFSideMenu added as child --- MFSideMenu/MFSideMenuContainerViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/MFSideMenu/MFSideMenuContainerViewController.m b/MFSideMenu/MFSideMenuContainerViewController.m index c56bb0b..3cf966d 100644 --- a/MFSideMenu/MFSideMenuContainerViewController.m +++ b/MFSideMenu/MFSideMenuContainerViewController.m @@ -229,6 +229,7 @@ - (void)setCenterViewController:(UIViewController *)centerViewController { if(!_centerViewController) return; [self addChildViewController:_centerViewController]; + centerViewController.view.frame = self.view.bounds; [self.view addSubview:[_centerViewController view]]; [((UIViewController *)_centerViewController) view].frame = (CGRect){.origin = origin, .size=centerViewController.view.frame.size};