diff --git a/SlideMenu.xcodeproj/project.pbxproj b/SlideMenu.xcodeproj/project.pbxproj index 5006a3d..6609ceb 100755 --- a/SlideMenu.xcodeproj/project.pbxproj +++ b/SlideMenu.xcodeproj/project.pbxproj @@ -525,6 +525,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch"; INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -536,6 +537,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SlideMenu/SlideMenu-Prefix.pch"; INFOPLIST_FILE = "SlideMenu/SlideMenu-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; diff --git a/SlideMenu/SlideMenu-Info.plist b/SlideMenu/SlideMenu-Info.plist index 09b1758..60eac98 100644 --- a/SlideMenu/SlideMenu-Info.plist +++ b/SlideMenu/SlideMenu-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.aryaxt.${PRODUCT_NAME:rfc1034identifier} + com.aryaxt.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/SlideMenu/Source/Animations/SlideNavigationContorllerAnimatorSlide.m b/SlideMenu/Source/Animations/SlideNavigationContorllerAnimatorSlide.m index 9e2c0c3..c694520 100644 --- a/SlideMenu/Source/Animations/SlideNavigationContorllerAnimatorSlide.m +++ b/SlideMenu/Source/Animations/SlideNavigationContorllerAnimatorSlide.m @@ -58,7 +58,7 @@ - (void)prepareMenuForAnimation:(Menu)menu ? [SlideNavigationController sharedInstance].leftMenu : [SlideNavigationController sharedInstance].rightMenu; - UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation; + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; CGRect rect = menuViewController.view.frame; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) @@ -67,9 +67,9 @@ - (void)prepareMenuForAnimation:(Menu)menu } else { - if (UIInterfaceOrientationIsLandscape(orientation)) + if (UIDeviceOrientationIsLandscape(orientation)) { - if (orientation == UIInterfaceOrientationLandscapeRight) + if (orientation == UIDeviceOrientationLandscapeRight) { rect.origin.y = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement; } @@ -80,7 +80,7 @@ - (void)prepareMenuForAnimation:(Menu)menu } else { - if (orientation == UIInterfaceOrientationPortrait) + if (orientation == UIDeviceOrientationPortrait) { rect.origin.x = (menu == MenuLeft) ? self.slideMovement*-1 : self.slideMovement; } @@ -100,7 +100,7 @@ - (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress ? [SlideNavigationController sharedInstance].leftMenu : [SlideNavigationController sharedInstance].rightMenu; - UIInterfaceOrientation orientation = [SlideNavigationController sharedInstance].interfaceOrientation; + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; NSInteger location = (menu == MenuLeft) ? (self.slideMovement * -1) + (self.slideMovement * progress) @@ -120,13 +120,13 @@ - (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress } else { - if (UIInterfaceOrientationIsLandscape(orientation)) + if (UIDeviceOrientationIsLandscape(orientation)) { - rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1; + rect.origin.y = (orientation == UIDeviceOrientationLandscapeRight) ? location : location*-1; } else { - rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1; + rect.origin.x = (orientation == UIDeviceOrientationPortrait) ? location : location*-1; } } @@ -147,8 +147,8 @@ - (void)clearMenu:(Menu)menu ? [SlideNavigationController sharedInstance].leftMenu : [SlideNavigationController sharedInstance].rightMenu; - UIInterfaceOrientation orientation= [SlideNavigationController sharedInstance].interfaceOrientation; - + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; + CGRect rect = menuViewController.view.frame; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) @@ -157,7 +157,7 @@ - (void)clearMenu:(Menu)menu } else { - if (UIInterfaceOrientationIsLandscape(orientation)) + if (UIDeviceOrientationIsLandscape(orientation)) { rect.origin.y = 0; } diff --git a/SlideMenu/Source/SlideNavigationController.m b/SlideMenu/Source/SlideNavigationController.m index 2785286..2efcdba 100644 --- a/SlideMenu/Source/SlideNavigationController.m +++ b/SlideMenu/Source/SlideNavigationController.m @@ -520,7 +520,7 @@ - (void)closeMenuWithDuration:(float)duration andCompletion:(void (^)())completi - (void)moveHorizontallyToLocation:(CGFloat)location { CGRect rect = self.view.frame; - UIInterfaceOrientation orientation = self.interfaceOrientation; + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; Menu menu = (self.horizontalLocation >= 0 && location >= 0) ? MenuLeft : MenuRight; if ((location > 0 && self.horizontalLocation <= 0) || (location < 0 && self.horizontalLocation >= 0)) { @@ -534,14 +534,14 @@ - (void)moveHorizontallyToLocation:(CGFloat)location } else { - if (UIInterfaceOrientationIsLandscape(orientation)) + if (UIDeviceOrientationIsLandscape(orientation)) { rect.origin.x = 0; - rect.origin.y = (orientation == UIInterfaceOrientationLandscapeRight) ? location : location*-1; + rect.origin.y = (orientation == UIDeviceOrientationLandscapeRight) ? location : location*-1; } else { - rect.origin.x = (orientation == UIInterfaceOrientationPortrait) ? location : location*-1; + rect.origin.x = (orientation == UIDeviceOrientationPortrait) ? location : location*-1; rect.origin.y = 0; } } @@ -570,16 +570,18 @@ - (CGRect)initialRectForMenu return rect; } - if (UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; + + if (UIDeviceOrientationIsLandscape(orientation)) { // For some reasons in landscape below the status bar is considered y=0, but in portrait it's considered y=20 - rect.origin.x = (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight) ? 0 : STATUS_BAR_HEIGHT; + rect.origin.x = (orientation == UIDeviceOrientationLandscapeRight) ? 0 : STATUS_BAR_HEIGHT; rect.size.width = self.view.frame.size.width-STATUS_BAR_HEIGHT; } else { // For some reasons in landscape below the status bar is considered y=0, but in portrait it's considered y=20 - rect.origin.y = (self.interfaceOrientation == UIInterfaceOrientationPortrait) ? STATUS_BAR_HEIGHT : 0; + rect.origin.y = (orientation == UIDeviceOrientationPortrait) ? STATUS_BAR_HEIGHT : 0; rect.size.height = self.view.frame.size.height-STATUS_BAR_HEIGHT; } @@ -608,7 +610,7 @@ - (void)prepareMenuForReveal:(Menu)menu - (CGFloat)horizontalLocation { CGRect rect = self.view.frame; - UIInterfaceOrientation orientation = self.interfaceOrientation; + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) { @@ -616,15 +618,15 @@ - (CGFloat)horizontalLocation } else { - if (UIInterfaceOrientationIsLandscape(orientation)) + if (UIDeviceOrientationIsLandscape(orientation)) { - return (orientation == UIInterfaceOrientationLandscapeRight) + return (orientation == UIDeviceOrientationLandscapeRight) ? rect.origin.y : rect.origin.y*-1; } else { - return (orientation == UIInterfaceOrientationPortrait) + return (orientation == UIDeviceOrientationPortrait) ? rect.origin.x : rect.origin.x*-1; } @@ -634,7 +636,7 @@ - (CGFloat)horizontalLocation - (CGFloat)horizontalSize { CGRect rect = self.view.frame; - UIInterfaceOrientation orientation = self.interfaceOrientation; + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) { @@ -642,7 +644,7 @@ - (CGFloat)horizontalSize } else { - if (UIInterfaceOrientationIsLandscape(orientation)) + if (UIDeviceOrientationIsLandscape(orientation)) { return rect.size.height; } @@ -675,7 +677,7 @@ - (void)navigationController:(UINavigationController *)navigationController - (CGFloat)slideOffset { - return (UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) + return (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) ? self.landscapeSlideOffset : self.portraitSlideOffset; }