diff --git a/Example/SideMenu.xcodeproj/project.pbxproj b/Example/SideMenu.xcodeproj/project.pbxproj index fdd9e5b..8e6d3e4 100644 --- a/Example/SideMenu.xcodeproj/project.pbxproj +++ b/Example/SideMenu.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 84430B131C31F6D100858AA8 /* PresentedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84430B121C31F6D100858AA8 /* PresentedViewController.swift */; }; 84788C771C2B9F1E00C4DAF4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84788C731C2B9F1E00C4DAF4 /* Assets.xcassets */; }; 84788C781C2B9F1E00C4DAF4 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84788C741C2B9F1E00C4DAF4 /* MainViewController.swift */; }; @@ -16,19 +15,8 @@ 84788C7D1C2BCDEB00C4DAF4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84788C7C1C2BCDEB00C4DAF4 /* Main.storyboard */; }; 847D41DA1CB498BE0079C28F /* SideMenuTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847D41D91CB498BE0079C28F /* SideMenuTableView.swift */; }; A91D298EBD84AC675595CCA0 /* Pods_SideMenu_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B02FB2E5A68EB8A0DF6615E0 /* Pods_SideMenu_Example.framework */; }; - AFA077A8EC0A5A74F8D6FF18 /* Pods_SideMenu_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8960F7A82F3CB64025C48B38 /* Pods_SideMenu_Tests.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 607FACC81AFB9204008FA782 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 607FACCF1AFB9204008FA782; - remoteInfo = SideMenu; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 1CE9C93C88C569ADEEDC53CE /* Pods-SideMenu_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SideMenu_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.release.xcconfig"; sourceTree = ""; }; 3B8C4133F58F48C964C0F124 /* SideMenu.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SideMenu.podspec; path = ../SideMenu.podspec; sourceTree = ""; }; @@ -36,7 +24,6 @@ 607FACD01AFB9204008FA782 /* SideMenu_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SideMenu_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 607FACE51AFB9204008FA782 /* SideMenu_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SideMenu_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 6DDF7DF7E11CBCA539322BE8 /* Pods-SideMenu_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SideMenu_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.debug.xcconfig"; sourceTree = ""; }; @@ -62,14 +49,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 607FACE21AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AFA077A8EC0A5A74F8D6FF18 /* Pods_SideMenu_Tests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -98,7 +77,6 @@ isa = PBXGroup; children = ( 607FACD01AFB9204008FA782 /* SideMenu_Example.app */, - 607FACE51AFB9204008FA782 /* SideMenu_Tests.xctest */, ); name = Products; sourceTree = ""; @@ -188,27 +166,6 @@ productReference = 607FACD01AFB9204008FA782 /* SideMenu_Example.app */; productType = "com.apple.product-type.application"; }; - 607FACE41AFB9204008FA782 /* SideMenu_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SideMenu_Tests" */; - buildPhases = ( - 31AA2B193033A70F0DC4D8BC /* Check Pods Manifest.lock */, - 607FACE11AFB9204008FA782 /* Sources */, - 607FACE21AFB9204008FA782 /* Frameworks */, - 607FACE31AFB9204008FA782 /* Resources */, - 63C45AE2A9ABFCA3A5392329 /* Embed Pods Frameworks */, - F525D1EFCF4F604EE3DD678E /* Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 607FACE71AFB9204008FA782 /* PBXTargetDependency */, - ); - name = SideMenu_Tests; - productName = Tests; - productReference = 607FACE51AFB9204008FA782 /* SideMenu_Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -221,13 +178,9 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = QTJ767UH3L; LastSwiftMigration = 0800; }; - 607FACE41AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0800; - TestTargetID = 607FACCF1AFB9204008FA782; - }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SideMenu" */; @@ -244,7 +197,6 @@ projectRoot = ""; targets = ( 607FACCF1AFB9204008FA782 /* SideMenu_Example */, - 607FACE41AFB9204008FA782 /* SideMenu_Tests */, ); }; /* End PBXProject section */ @@ -260,31 +212,9 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 607FACE31AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 31AA2B193033A70F0DC4D8BC /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; 41E5D8BB7FB0A1216A7087C7 /* Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -300,21 +230,6 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 63C45AE2A9ABFCA3A5392329 /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 6CF51B7E726BF6DC7DC7B7F7 /* Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -345,21 +260,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - F525D1EFCF4F604EE3DD678E /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -374,24 +274,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 607FACE11AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 607FACCF1AFB9204008FA782 /* SideMenu_Example */; - targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { isa = PBXVariantGroup; @@ -498,6 +382,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + DEVELOPMENT_TEAM = QTJ767UH3L; INFOPLIST_FILE = SideMenu/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; @@ -516,6 +401,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + DEVELOPMENT_TEAM = QTJ767UH3L; INFOPLIST_FILE = SideMenu/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; @@ -526,42 +412,6 @@ }; name = Release; }; - 607FACF31AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DE8F7B5954B4505A3C5E06E2 /* Pods-SideMenu_Tests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SideMenu_Example.app/SideMenu_Example"; - }; - name = Debug; - }; - 607FACF41AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1CE9C93C88C569ADEEDC53CE /* Pods-SideMenu_Tests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SideMenu_Example.app/SideMenu_Example"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -583,15 +433,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SideMenu_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF31AFB9204008FA782 /* Debug */, - 607FACF41AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = 607FACC81AFB9204008FA782 /* Project object */; diff --git a/Example/SideMenu/Main.storyboard b/Example/SideMenu/Main.storyboard index cfa4f27..917ee31 100644 --- a/Example/SideMenu/Main.storyboard +++ b/Example/SideMenu/Main.storyboard @@ -1,22 +1,22 @@ - + - + + - - - + + @@ -39,39 +39,32 @@ - - - - + - + - - + - + - @@ -79,62 +72,53 @@ - + - - + - + - - + - + - - + - + - @@ -142,7 +126,7 @@ - + @@ -194,13 +178,12 @@ - + @@ -229,7 +212,6 @@ - @@ -272,12 +254,12 @@ - + - + @@ -286,19 +268,19 @@ - + - + @@ -307,19 +289,19 @@ - + - + @@ -328,19 +310,19 @@ - + - + @@ -370,7 +352,7 @@ - + @@ -403,12 +385,12 @@ - + - + @@ -417,19 +399,19 @@ - + - + @@ -438,19 +420,19 @@ - + - + @@ -459,19 +441,19 @@ - + - + @@ -503,16 +485,15 @@ - + @@ -545,16 +526,15 @@ - + @@ -587,16 +567,15 @@ - + @@ -627,7 +606,7 @@ - + @@ -648,7 +627,7 @@ - + @@ -659,5 +638,5 @@ - + diff --git a/Pod/Classes/SideMenuTransition.swift b/Pod/Classes/SideMenuTransition.swift index 78306a2..be657ad 100644 --- a/Pod/Classes/SideMenuTransition.swift +++ b/Pod/Classes/SideMenuTransition.swift @@ -242,10 +242,10 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC case .viewSlideInOut: menuView.alpha = 1 - menuView.layer.shadowColor = SideMenuManager.menuShadowColor.cgColor - menuView.layer.shadowRadius = SideMenuManager.menuShadowRadius - menuView.layer.shadowOpacity = SideMenuManager.menuShadowOpacity - menuView.layer.shadowOffset = CGSize(width: 0, height: 0) + mainViewController.view.layer.shadowColor = SideMenuManager.menuShadowColor.cgColor + mainViewController.view.layer.shadowRadius = SideMenuManager.menuShadowRadius + mainViewController.view.layer.shadowOpacity = SideMenuManager.menuShadowOpacity + mainViewController.view.layer.shadowOffset = CGSize(width: 0, height: 0) let direction:CGFloat = SideMenuTransition.presentDirection == .left ? 1 : -1 mainViewController.view.frame = CGRect(x: direction * (menuView.frame.width), y: 0, width: size.width, height: size.height) mainViewController.view.transform = CGAffineTransform(scaleX: SideMenuManager.menuAnimationTransformScaleFactor, y: SideMenuManager.menuAnimationTransformScaleFactor) @@ -253,10 +253,12 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC case .menuSlideIn, .menuDissolveIn: menuView.alpha = 1 - menuView.layer.shadowColor = SideMenuManager.menuShadowColor.cgColor - menuView.layer.shadowRadius = SideMenuManager.menuShadowRadius - menuView.layer.shadowOpacity = SideMenuManager.menuShadowOpacity - menuView.layer.shadowOffset = CGSize(width: 0, height: 0) + if SideMenuManager.menuBlurEffectStyle == nil { + menuView.layer.shadowColor = SideMenuManager.menuShadowColor.cgColor + menuView.layer.shadowRadius = SideMenuManager.menuShadowRadius + menuView.layer.shadowOpacity = SideMenuManager.menuShadowOpacity + menuView.layer.shadowOffset = CGSize(width: 0, height: 0) + } mainViewController.view.frame = CGRect(x: 0, y: 0, width: size.width, height: size.height) mainViewController.view.transform = CGAffineTransform(scaleX: SideMenuManager.menuAnimationTransformScaleFactor, y: SideMenuManager.menuAnimationTransformScaleFactor) mainViewController.view.alpha = 1 - SideMenuManager.menuAnimationFadeStrength @@ -332,13 +334,13 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC // add the both views to our view controller switch SideMenuManager.menuPresentMode { - case .viewSlideOut: + case .viewSlideOut, .viewSlideInOut: container.addSubview(menuView!) container.addSubview(topView!) if let tapView = tapView { topView?.addSubview(tapView) } - case .menuSlideIn, .menuDissolveIn, .viewSlideInOut: + case .menuSlideIn, .menuDissolveIn: container.addSubview(topView!) if let tapView = tapView { container.addSubview(tapView) @@ -398,9 +400,9 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC menuView?.isUserInteractionEnabled = true transitionContext.completeTransition(true) switch SideMenuManager.menuPresentMode { - case .viewSlideOut: + case .viewSlideOut, .viewSlideInOut: container.addSubview(topView!) - case .menuSlideIn, .menuDissolveIn, .viewSlideInOut: + case .menuSlideIn, .menuDissolveIn: container.insertSubview(topView!, at: 0) } if let statusBarView = SideMenuTransition.statusBarView {