diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..cebed2b --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,14 @@ +PODS: + - SideMenu (0.1.0) + +DEPENDENCIES: + - SideMenu (from `../`) + +EXTERNAL SOURCES: + SideMenu: + :path: ../ + +SPEC CHECKSUMS: + SideMenu: 69301b63864937c9ce956fe6eea6c051309702b8 + +COCOAPODS: 0.39.0 diff --git a/Example/Pods/Local Podspecs/SideMenu.podspec.json b/Example/Pods/Local Podspecs/SideMenu.podspec.json new file mode 100644 index 0000000..b83f7c3 --- /dev/null +++ b/Example/Pods/Local Podspecs/SideMenu.podspec.json @@ -0,0 +1,25 @@ +{ + "name": "SideMenu", + "version": "0.1.0", + "summary": "A short description of SideMenu.", + "description": "", + "homepage": "https://github.com//SideMenu", + "license": "MIT", + "authors": { + "jonkykong": "jpkent@gmail.com" + }, + "source": { + "git": "https://github.com//SideMenu.git", + "tag": "0.1.0" + }, + "platforms": { + "ios": "8.0" + }, + "requires_arc": true, + "source_files": "Pod/Classes/**/*", + "resource_bundles": { + "SideMenu": [ + "Pod/Assets/*.png" + ] + } +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..cebed2b --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,14 @@ +PODS: + - SideMenu (0.1.0) + +DEPENDENCIES: + - SideMenu (from `../`) + +EXTERNAL SOURCES: + SideMenu: + :path: ../ + +SPEC CHECKSUMS: + SideMenu: 69301b63864937c9ce956fe6eea6c051309702b8 + +COCOAPODS: 0.39.0 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..adf0e6f --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,780 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 38E7197A7FA54FE6EA9474F7C71E9F16 /* SideMenu.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 80BEBB037771664BE7EDD19D9FA27CF9 /* SideMenu.bundle */; }; + 654B24B050E549972B44628F3D457134 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; + 65CAFD32BFFE0B95AC0AD095EE320645 /* SideMenu-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 065251241095423AD65BFAC01FD1EFC6 /* SideMenu-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8AA9CBD72AFC76A9039A8CF9CE6AC1B1 /* Pods-SideMenu_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BE2CB4DECBCC7820640717CC54B8B6 /* Pods-SideMenu_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8AFB3DFF4F1A5C3F872B5980F29340A0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; + 92A9FE9F77CE2BA2AB924DB02E446C76 /* SideMenuManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B5455C690C42784185F70B2287AEA03 /* SideMenuManager.swift */; }; + BBA8C724C31EBC571ED008721DC191C7 /* SideMenu-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B967E268029BFFB818450080E0070B3 /* SideMenu-dummy.m */; }; + D15E623D3EA1175C6ECE8E7F96F03F1B /* Pods-SideMenu_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F3BE17EC6C115709ADE0336BED36620B /* Pods-SideMenu_Example-dummy.m */; }; + E8F227DB44F0E28D22866613E7466FE8 /* Pods-SideMenu_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6442E0432AE7807F49351AA4A2662BA0 /* Pods-SideMenu_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E93EFE2668CC8435D5DE5C232FA073A2 /* Pods-SideMenu_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8894543047CFB1B0AD661193D079E3AF /* Pods-SideMenu_Tests-dummy.m */; }; + F2AAB107C954F88C4FE89A8DE36B7BE9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4B5C7FA46A9E0B31AE0E21FC1A69DC8C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 92B1C7A9E8122442B031A44C1CA691AF; + remoteInfo = SideMenu; + }; + AF8832E88868CAED89AD3FD109BF4D63 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 92B1C7A9E8122442B031A44C1CA691AF; + remoteInfo = SideMenu; + }; + C53FFAFE325161C6BCFFE6CA21CEEAB7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = E1DAF96BD20334D315D2D4F1ACA05F8F; + remoteInfo = "SideMenu-SideMenu"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 008DC3F522BB77CA433076CC5CF9B3EC /* Pods-SideMenu_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SideMenu_Tests.modulemap"; sourceTree = ""; }; + 02386539B907565FEF643C0A13DFD87A /* Pods-SideMenu_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SideMenu_Example-acknowledgements.plist"; sourceTree = ""; }; + 065251241095423AD65BFAC01FD1EFC6 /* SideMenu-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SideMenu-umbrella.h"; sourceTree = ""; }; + 080DBC3EDE1B586D2C363264990812F4 /* Pods_SideMenu_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SideMenu_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0B5455C690C42784185F70B2287AEA03 /* SideMenuManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SideMenuManager.swift; sourceTree = ""; }; + 167CC8746E153424CD7BBFBEB1FCC761 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SideMenu.xcconfig; sourceTree = ""; }; + 1B967E268029BFFB818450080E0070B3 /* SideMenu-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SideMenu-dummy.m"; sourceTree = ""; }; + 27F802E03D96716FDA4B8EB2F79D3442 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 283B837F6AEE40BE625A3B7BF3D629C4 /* Pods-SideMenu_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SideMenu_Tests.debug.xcconfig"; sourceTree = ""; }; + 365023FDA9AABF541F5F2BB4897DBC3D /* SideMenu-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SideMenu-prefix.pch"; sourceTree = ""; }; + 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 43082750426B0601530DDE0E513C028D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4A39C572A277557DAA2B7F405733260D /* SideMenu.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SideMenu.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6442E0432AE7807F49351AA4A2662BA0 /* Pods-SideMenu_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SideMenu_Example-umbrella.h"; sourceTree = ""; }; + 65FFBCA0CFA6E5D51F8740F6ACA8B653 /* Pods-SideMenu_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SideMenu_Example-resources.sh"; sourceTree = ""; }; + 66BE2CB4DECBCC7820640717CC54B8B6 /* Pods-SideMenu_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SideMenu_Tests-umbrella.h"; sourceTree = ""; }; + 69E867DCFAA7925F146E777887F5B9A0 /* Pods-SideMenu_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SideMenu_Example-frameworks.sh"; sourceTree = ""; }; + 76FABC8A247A89E1D0C00FE872F74957 /* Pods-SideMenu_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SideMenu_Example.modulemap"; sourceTree = ""; }; + 7A33DBD451113CEA477F6037072FB24F /* SideMenu.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SideMenu.modulemap; sourceTree = ""; }; + 80BEBB037771664BE7EDD19D9FA27CF9 /* SideMenu.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SideMenu.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 8894543047CFB1B0AD661193D079E3AF /* Pods-SideMenu_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SideMenu_Tests-dummy.m"; sourceTree = ""; }; + 8C8996A684FFB0A03C0298FA9C22C599 /* Pods-SideMenu_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SideMenu_Example.release.xcconfig"; sourceTree = ""; }; + 9BD9EE073A93C4FF5537C83246116880 /* Pods_SideMenu_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SideMenu_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9EF8186F4C9E56B047D9FD1A6E197E35 /* Pods-SideMenu_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SideMenu_Tests-resources.sh"; sourceTree = ""; }; + A108300E5F9E66CC5B80C6D158F1A2B4 /* Pods-SideMenu_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SideMenu_Tests-frameworks.sh"; sourceTree = ""; }; + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + CCFF9BC0A5E0AEB1B572E08B7BEB5179 /* Pods-SideMenu_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SideMenu_Example.debug.xcconfig"; sourceTree = ""; }; + DB5D86340A731D1EBAB66BA453409E3B /* Pods-SideMenu_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SideMenu_Tests-acknowledgements.plist"; sourceTree = ""; }; + DDF7D1E1EB67D0EE22B89DBA15B34455 /* Pods-SideMenu_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SideMenu_Tests.release.xcconfig"; sourceTree = ""; }; + DE75E648D267654445B52C8280543EFD /* Pods-SideMenu_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SideMenu_Tests-acknowledgements.markdown"; sourceTree = ""; }; + F3BE17EC6C115709ADE0336BED36620B /* Pods-SideMenu_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SideMenu_Example-dummy.m"; sourceTree = ""; }; + F814F8DD5AF194A2929BD9B6126E6272 /* Pods-SideMenu_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SideMenu_Example-acknowledgements.markdown"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5533E548BE4D750AD5FEA7A04776DED3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F2AAB107C954F88C4FE89A8DE36B7BE9 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 943E376D46506CF3E623AE4762F15042 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8AFB3DFF4F1A5C3F872B5980F29340A0 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BA03D82EBBC96EF58E5E51C9DE02FFC6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CD3D74524BB0D7B632CB6C81160DEEE1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 654B24B050E549972B44628F3D457134 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 336C93834489346B85108249E414E0BE /* Development Pods */ = { + isa = PBXGroup; + children = ( + 34BEDB4240BF71B8086595F752B69042 /* SideMenu */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 34BEDB4240BF71B8086595F752B69042 /* SideMenu */ = { + isa = PBXGroup; + children = ( + CB203E0872A2E52C8E99D04334ED5A9D /* Pod */, + E193E81FDAC4759729D7C787A23DAA84 /* Support Files */, + ); + name = SideMenu; + path = ../..; + sourceTree = ""; + }; + 42F4169C1135EF13A1D0421D270BD2F4 /* Classes */ = { + isa = PBXGroup; + children = ( + 0B5455C690C42784185F70B2287AEA03 /* SideMenuManager.swift */, + ); + path = Classes; + sourceTree = ""; + }; + 535019BE0CA7EA7A16E7101CEA0CB8E7 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + A94B9130D4AB3D2F2C9607150B2ADFB6 /* Pods-SideMenu_Example */, + 80EA2FE0F717229BE7E4B06C5D695FA5 /* Pods-SideMenu_Tests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + 336C93834489346B85108249E414E0BE /* Development Pods */, + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, + 92DBF817E62062F335E4FB7B6F6F149D /* Products */, + 535019BE0CA7EA7A16E7101CEA0CB8E7 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 80EA2FE0F717229BE7E4B06C5D695FA5 /* Pods-SideMenu_Tests */ = { + isa = PBXGroup; + children = ( + 27F802E03D96716FDA4B8EB2F79D3442 /* Info.plist */, + 008DC3F522BB77CA433076CC5CF9B3EC /* Pods-SideMenu_Tests.modulemap */, + DE75E648D267654445B52C8280543EFD /* Pods-SideMenu_Tests-acknowledgements.markdown */, + DB5D86340A731D1EBAB66BA453409E3B /* Pods-SideMenu_Tests-acknowledgements.plist */, + 8894543047CFB1B0AD661193D079E3AF /* Pods-SideMenu_Tests-dummy.m */, + A108300E5F9E66CC5B80C6D158F1A2B4 /* Pods-SideMenu_Tests-frameworks.sh */, + 9EF8186F4C9E56B047D9FD1A6E197E35 /* Pods-SideMenu_Tests-resources.sh */, + 66BE2CB4DECBCC7820640717CC54B8B6 /* Pods-SideMenu_Tests-umbrella.h */, + 283B837F6AEE40BE625A3B7BF3D629C4 /* Pods-SideMenu_Tests.debug.xcconfig */, + DDF7D1E1EB67D0EE22B89DBA15B34455 /* Pods-SideMenu_Tests.release.xcconfig */, + ); + name = "Pods-SideMenu_Tests"; + path = "Target Support Files/Pods-SideMenu_Tests"; + sourceTree = ""; + }; + 92DBF817E62062F335E4FB7B6F6F149D /* Products */ = { + isa = PBXGroup; + children = ( + 9BD9EE073A93C4FF5537C83246116880 /* Pods_SideMenu_Example.framework */, + 080DBC3EDE1B586D2C363264990812F4 /* Pods_SideMenu_Tests.framework */, + 80BEBB037771664BE7EDD19D9FA27CF9 /* SideMenu.bundle */, + 4A39C572A277557DAA2B7F405733260D /* SideMenu.framework */, + ); + name = Products; + sourceTree = ""; + }; + A94B9130D4AB3D2F2C9607150B2ADFB6 /* Pods-SideMenu_Example */ = { + isa = PBXGroup; + children = ( + 43082750426B0601530DDE0E513C028D /* Info.plist */, + 76FABC8A247A89E1D0C00FE872F74957 /* Pods-SideMenu_Example.modulemap */, + F814F8DD5AF194A2929BD9B6126E6272 /* Pods-SideMenu_Example-acknowledgements.markdown */, + 02386539B907565FEF643C0A13DFD87A /* Pods-SideMenu_Example-acknowledgements.plist */, + F3BE17EC6C115709ADE0336BED36620B /* Pods-SideMenu_Example-dummy.m */, + 69E867DCFAA7925F146E777887F5B9A0 /* Pods-SideMenu_Example-frameworks.sh */, + 65FFBCA0CFA6E5D51F8740F6ACA8B653 /* Pods-SideMenu_Example-resources.sh */, + 6442E0432AE7807F49351AA4A2662BA0 /* Pods-SideMenu_Example-umbrella.h */, + CCFF9BC0A5E0AEB1B572E08B7BEB5179 /* Pods-SideMenu_Example.debug.xcconfig */, + 8C8996A684FFB0A03C0298FA9C22C599 /* Pods-SideMenu_Example.release.xcconfig */, + ); + name = "Pods-SideMenu_Example"; + path = "Target Support Files/Pods-SideMenu_Example"; + sourceTree = ""; + }; + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + isa = PBXGroup; + children = ( + BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */ = { + isa = PBXGroup; + children = ( + 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + CB203E0872A2E52C8E99D04334ED5A9D /* Pod */ = { + isa = PBXGroup; + children = ( + 42F4169C1135EF13A1D0421D270BD2F4 /* Classes */, + ); + path = Pod; + sourceTree = ""; + }; + E193E81FDAC4759729D7C787A23DAA84 /* Support Files */ = { + isa = PBXGroup; + children = ( + 167CC8746E153424CD7BBFBEB1FCC761 /* Info.plist */, + 7A33DBD451113CEA477F6037072FB24F /* SideMenu.modulemap */, + 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */, + 1B967E268029BFFB818450080E0070B3 /* SideMenu-dummy.m */, + 365023FDA9AABF541F5F2BB4897DBC3D /* SideMenu-prefix.pch */, + 065251241095423AD65BFAC01FD1EFC6 /* SideMenu-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/SideMenu"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2F139747C28B1CAD84AED093C0C78764 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8AA9CBD72AFC76A9039A8CF9CE6AC1B1 /* Pods-SideMenu_Tests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 39BFA88BB58C8DFDF21395C7A6FD7D25 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 65CAFD32BFFE0B95AC0AD095EE320645 /* SideMenu-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A7F3E621BF02EEE4975A3B0AE80E6D1E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E8F227DB44F0E28D22866613E7466FE8 /* Pods-SideMenu_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 1CFBAFD841540AFF4D8957D6DC91C8C8 /* Pods-SideMenu_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7FE2F09AF56807079C7692E4D8ECEEF5 /* Build configuration list for PBXNativeTarget "Pods-SideMenu_Example" */; + buildPhases = ( + 3FB7DDF67A1F4F0F5EF7B0816E994338 /* Sources */, + 943E376D46506CF3E623AE4762F15042 /* Frameworks */, + A7F3E621BF02EEE4975A3B0AE80E6D1E /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 792BF21D4750F78605E9D568A23C4050 /* PBXTargetDependency */, + ); + name = "Pods-SideMenu_Example"; + productName = "Pods-SideMenu_Example"; + productReference = 9BD9EE073A93C4FF5537C83246116880 /* Pods_SideMenu_Example.framework */; + productType = "com.apple.product-type.framework"; + }; + 92B1C7A9E8122442B031A44C1CA691AF /* SideMenu */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9057029D293AD6EDC6335C1F302EE42B /* Build configuration list for PBXNativeTarget "SideMenu" */; + buildPhases = ( + CA771114E7DB1C9C7E995AE8242C4F19 /* Sources */, + CD3D74524BB0D7B632CB6C81160DEEE1 /* Frameworks */, + FAC25EAFE8B8901BDEDD21DAC9DD45ED /* Resources */, + 39BFA88BB58C8DFDF21395C7A6FD7D25 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 0CEB01945912CADFFDDB6BF97E3CBC80 /* PBXTargetDependency */, + ); + name = SideMenu; + productName = SideMenu; + productReference = 4A39C572A277557DAA2B7F405733260D /* SideMenu.framework */; + productType = "com.apple.product-type.framework"; + }; + 9A917F761DB457848033166EAD49121D /* Pods-SideMenu_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3D93A69AAD3C2EED734F2EF2AC5E2718 /* Build configuration list for PBXNativeTarget "Pods-SideMenu_Tests" */; + buildPhases = ( + BBE7966CDCB0E7D186332C938A2F1E30 /* Sources */, + 5533E548BE4D750AD5FEA7A04776DED3 /* Frameworks */, + 2F139747C28B1CAD84AED093C0C78764 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 9E6860527E52EB037214858D71A0107A /* PBXTargetDependency */, + ); + name = "Pods-SideMenu_Tests"; + productName = "Pods-SideMenu_Tests"; + productReference = 080DBC3EDE1B586D2C363264990812F4 /* Pods_SideMenu_Tests.framework */; + productType = "com.apple.product-type.framework"; + }; + E1DAF96BD20334D315D2D4F1ACA05F8F /* SideMenu-SideMenu */ = { + isa = PBXNativeTarget; + buildConfigurationList = 95C0868EE6D930679F6D9D041CCB3AAE /* Build configuration list for PBXNativeTarget "SideMenu-SideMenu" */; + buildPhases = ( + A55FD4B95792AEB94FAFD93F3F909692 /* Sources */, + BA03D82EBBC96EF58E5E51C9DE02FFC6 /* Frameworks */, + 6D6DF051EEB26F357B8FD0E650FB5BF9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "SideMenu-SideMenu"; + productName = "SideMenu-SideMenu"; + productReference = 80BEBB037771664BE7EDD19D9FA27CF9 /* SideMenu.bundle */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 92DBF817E62062F335E4FB7B6F6F149D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1CFBAFD841540AFF4D8957D6DC91C8C8 /* Pods-SideMenu_Example */, + 9A917F761DB457848033166EAD49121D /* Pods-SideMenu_Tests */, + 92B1C7A9E8122442B031A44C1CA691AF /* SideMenu */, + E1DAF96BD20334D315D2D4F1ACA05F8F /* SideMenu-SideMenu */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6D6DF051EEB26F357B8FD0E650FB5BF9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FAC25EAFE8B8901BDEDD21DAC9DD45ED /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 38E7197A7FA54FE6EA9474F7C71E9F16 /* SideMenu.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3FB7DDF67A1F4F0F5EF7B0816E994338 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D15E623D3EA1175C6ECE8E7F96F03F1B /* Pods-SideMenu_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A55FD4B95792AEB94FAFD93F3F909692 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BBE7966CDCB0E7D186332C938A2F1E30 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E93EFE2668CC8435D5DE5C232FA073A2 /* Pods-SideMenu_Tests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CA771114E7DB1C9C7E995AE8242C4F19 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BBA8C724C31EBC571ED008721DC191C7 /* SideMenu-dummy.m in Sources */, + 92A9FE9F77CE2BA2AB924DB02E446C76 /* SideMenuManager.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0CEB01945912CADFFDDB6BF97E3CBC80 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SideMenu-SideMenu"; + target = E1DAF96BD20334D315D2D4F1ACA05F8F /* SideMenu-SideMenu */; + targetProxy = C53FFAFE325161C6BCFFE6CA21CEEAB7 /* PBXContainerItemProxy */; + }; + 792BF21D4750F78605E9D568A23C4050 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SideMenu; + target = 92B1C7A9E8122442B031A44C1CA691AF /* SideMenu */; + targetProxy = 4B5C7FA46A9E0B31AE0E21FC1A69DC8C /* PBXContainerItemProxy */; + }; + 9E6860527E52EB037214858D71A0107A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SideMenu; + target = 92B1C7A9E8122442B031A44C1CA691AF /* SideMenu */; + targetProxy = AF8832E88868CAED89AD3FD109BF4D63 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1172A3F34D7462D0EFC174D13D0724C0 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + PRODUCT_NAME = SideMenu; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 14F143D5C2752E44749D1EC383187D83 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SideMenu/SideMenu-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SideMenu/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SideMenu/SideMenu.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = SideMenu; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 1A1DFAB73E3BCE317F818DF29B215695 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SideMenu/SideMenu-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SideMenu/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SideMenu/SideMenu.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = SideMenu; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 2EB0CE4B4B01F7BD476A4D670271AE17 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CCFF9BC0A5E0AEB1B572E08B7BEB5179 /* Pods-SideMenu_Example.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_SideMenu_Example; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 4BB072E6B47F8EB051B54E2DE42E1FD8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DDF7D1E1EB67D0EE22B89DBA15B34455 /* Pods-SideMenu_Tests.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_SideMenu_Tests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 552D02D5BA751AC2E8790D2811D496CA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + ONLY_ACTIVE_ARCH = YES; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + A7BE67B6B9190796258F5FDAEAC80D73 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 18CAD0A610A9A596A337B81EA6C75E82 /* SideMenu.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + PRODUCT_NAME = SideMenu; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + F63258B6CA1B3208C73CC58D46C45DCC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8C8996A684FFB0A03C0298FA9C22C599 /* Pods-SideMenu_Example.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_SideMenu_Example; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + F768C225F5E2AABD5C951C2B97495DB8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 283B837F6AEE40BE625A3B7BF3D629C4 /* Pods-SideMenu_Tests.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + INFOPLIST_FILE = "Target Support Files/Pods-SideMenu_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_SideMenu_Tests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 552D02D5BA751AC2E8790D2811D496CA /* Debug */, + 10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3D93A69AAD3C2EED734F2EF2AC5E2718 /* Build configuration list for PBXNativeTarget "Pods-SideMenu_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F768C225F5E2AABD5C951C2B97495DB8 /* Debug */, + 4BB072E6B47F8EB051B54E2DE42E1FD8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7FE2F09AF56807079C7692E4D8ECEEF5 /* Build configuration list for PBXNativeTarget "Pods-SideMenu_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2EB0CE4B4B01F7BD476A4D670271AE17 /* Debug */, + F63258B6CA1B3208C73CC58D46C45DCC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9057029D293AD6EDC6335C1F302EE42B /* Build configuration list for PBXNativeTarget "SideMenu" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A1DFAB73E3BCE317F818DF29B215695 /* Debug */, + 14F143D5C2752E44749D1EC383187D83 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 95C0868EE6D930679F6D9D041CCB3AAE /* Build configuration list for PBXNativeTarget "SideMenu-SideMenu" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1172A3F34D7462D0EFC174D13D0724C0 /* Debug */, + A7BE67B6B9190796258F5FDAEAC80D73 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SideMenu.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SideMenu.xcscheme new file mode 100644 index 0000000..a887129 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SideMenu.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Info.plist b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Info.plist new file mode 100644 index 0000000..6974542 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-acknowledgements.markdown new file mode 100644 index 0000000..e91e4bc --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## SideMenu + +Copyright (c) 2015 jonkykong + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-acknowledgements.plist new file mode 100644 index 0000000..9de388d --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-acknowledgements.plist @@ -0,0 +1,56 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 jonkykong <jpkent@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + Title + SideMenu + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-dummy.m b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-dummy.m new file mode 100644 index 0000000..c05569d --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_SideMenu_Example : NSObject +@end +@implementation PodsDummy_Pods_SideMenu_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-frameworks.sh new file mode 100755 index 0000000..a74fc2f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-frameworks.sh @@ -0,0 +1,91 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "Pods-SideMenu_Example/SideMenu.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "Pods-SideMenu_Example/SideMenu.framework" +fi diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-resources.sh b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-resources.sh new file mode 100755 index 0000000..16774fb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-resources.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-umbrella.h new file mode 100644 index 0000000..d6eb6fd --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double Pods_SideMenu_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_SideMenu_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.debug.xcconfig new file mode 100644 index 0000000..4b173e7 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.debug.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/SideMenu.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "SideMenu" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-SideMenu_Example +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap new file mode 100644 index 0000000..19fd4dd --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_SideMenu_Example { + umbrella header "Pods-SideMenu_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.release.xcconfig new file mode 100644 index 0000000..4b173e7 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.release.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/SideMenu.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "SideMenu" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-SideMenu_Example +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Info.plist new file mode 100644 index 0000000..6974542 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-acknowledgements.markdown new file mode 100644 index 0000000..e91e4bc --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## SideMenu + +Copyright (c) 2015 jonkykong + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-acknowledgements.plist new file mode 100644 index 0000000..9de388d --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-acknowledgements.plist @@ -0,0 +1,56 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015 jonkykong <jpkent@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + Title + SideMenu + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-dummy.m new file mode 100644 index 0000000..ec93fd8 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_SideMenu_Tests : NSObject +@end +@implementation PodsDummy_Pods_SideMenu_Tests +@end diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-frameworks.sh new file mode 100755 index 0000000..902c881 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-frameworks.sh @@ -0,0 +1,91 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "Pods-SideMenu_Tests/SideMenu.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "Pods-SideMenu_Tests/SideMenu.framework" +fi diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-resources.sh new file mode 100755 index 0000000..16774fb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-resources.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +realpath() { + DIRECTORY="$(cd "${1%/*}" && pwd)" + FILENAME="${1##*/}" + echo "$DIRECTORY/$FILENAME" +} + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" + xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "`realpath $PODS_ROOT`*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-umbrella.h new file mode 100644 index 0000000..b44ddd8 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double Pods_SideMenu_TestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_SideMenu_TestsVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.debug.xcconfig new file mode 100644 index 0000000..9360d05 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.debug.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/SideMenu.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "SideMenu" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-SideMenu_Tests +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap new file mode 100644 index 0000000..b1dbeb3 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_SideMenu_Tests { + umbrella header "Pods-SideMenu_Tests-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.release.xcconfig new file mode 100644 index 0000000..9360d05 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SideMenu_Tests/Pods-SideMenu_Tests.release.xcconfig @@ -0,0 +1,8 @@ +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/SideMenu.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "SideMenu" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-SideMenu_Tests +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Target Support Files/SideMenu/Info.plist b/Example/Pods/Target Support Files/SideMenu/Info.plist new file mode 100644 index 0000000..4ba5fa2 --- /dev/null +++ b/Example/Pods/Target Support Files/SideMenu/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/SideMenu/SideMenu-dummy.m b/Example/Pods/Target Support Files/SideMenu/SideMenu-dummy.m new file mode 100644 index 0000000..bd363f7 --- /dev/null +++ b/Example/Pods/Target Support Files/SideMenu/SideMenu-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SideMenu : NSObject +@end +@implementation PodsDummy_SideMenu +@end diff --git a/Example/Pods/Target Support Files/SideMenu/SideMenu-prefix.pch b/Example/Pods/Target Support Files/SideMenu/SideMenu-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Example/Pods/Target Support Files/SideMenu/SideMenu-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Example/Pods/Target Support Files/SideMenu/SideMenu-umbrella.h b/Example/Pods/Target Support Files/SideMenu/SideMenu-umbrella.h new file mode 100644 index 0000000..40eede8 --- /dev/null +++ b/Example/Pods/Target Support Files/SideMenu/SideMenu-umbrella.h @@ -0,0 +1,6 @@ +#import + + +FOUNDATION_EXPORT double SideMenuVersionNumber; +FOUNDATION_EXPORT const unsigned char SideMenuVersionString[]; + diff --git a/Example/Pods/Target Support Files/SideMenu/SideMenu.modulemap b/Example/Pods/Target Support Files/SideMenu/SideMenu.modulemap new file mode 100644 index 0000000..796e914 --- /dev/null +++ b/Example/Pods/Target Support Files/SideMenu/SideMenu.modulemap @@ -0,0 +1,6 @@ +framework module SideMenu { + umbrella header "SideMenu-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/SideMenu/SideMenu.xcconfig b/Example/Pods/Target Support Files/SideMenu/SideMenu.xcconfig new file mode 100644 index 0000000..31a4bb2 --- /dev/null +++ b/Example/Pods/Target Support Files/SideMenu/SideMenu.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SideMenu" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/SideMenu.xcodeproj/project.pbxproj b/Example/SideMenu.xcodeproj/project.pbxproj index 7ce9ca8..b2af516 100644 --- a/Example/SideMenu.xcodeproj/project.pbxproj +++ b/Example/SideMenu.xcodeproj/project.pbxproj @@ -7,12 +7,13 @@ objects = { /* Begin PBXBuildFile section */ - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; + 84788C771C2B9F1E00C4DAF4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84788C731C2B9F1E00C4DAF4 /* Assets.xcassets */; }; + 84788C781C2B9F1E00C4DAF4 /* MainVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84788C741C2B9F1E00C4DAF4 /* MainVC.swift */; }; + 84788C7B1C2B9FAB00C4DAF4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84788C7A1C2B9FAB00C4DAF4 /* AppDelegate.swift */; }; + 84788C7D1C2BCDEB00C4DAF4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84788C7C1C2BCDEB00C4DAF4 /* Main.storyboard */; }; + 84788C831C2CED6200C4DAF4 /* SideMenuManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84788C821C2CED6200C4DAF4 /* SideMenuManager.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 */ @@ -33,16 +34,17 @@ 534FE89D0A72943B3C15B028 /* Pods-SideMenu_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SideMenu_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SideMenu_Example/Pods-SideMenu_Example.release.xcconfig"; sourceTree = ""; }; 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 = ""; }; - 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 607FACE51AFB9204008FA782 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = Tests.xctest; path = SideMenu_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 = ""; }; 75F76C63719650060A8FB678 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 84788C731C2B9F1E00C4DAF4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 84788C741C2B9F1E00C4DAF4 /* MainVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainVC.swift; sourceTree = ""; }; + 84788C7A1C2B9FAB00C4DAF4 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 84788C7C1C2BCDEB00C4DAF4 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; + 84788C821C2CED6200C4DAF4 /* SideMenuManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideMenuManager.swift; sourceTree = ""; }; 8960F7A82F3CB64025C48B38 /* Pods_SideMenu_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SideMenu_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A20C1DB98DEF29F3CE8D592A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; B02FB2E5A68EB8A0DF6615E0 /* Pods_SideMenu_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SideMenu_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -94,7 +96,7 @@ isa = PBXGroup; children = ( 607FACD01AFB9204008FA782 /* SideMenu_Example.app */, - 607FACE51AFB9204008FA782 /* Tests.xctest */, + 607FACE51AFB9204008FA782 /* SideMenu_Tests.xctest */, ); name = Products; sourceTree = ""; @@ -102,11 +104,12 @@ 607FACD21AFB9204008FA782 /* Example for SideMenu */ = { isa = PBXGroup; children = ( - 607FACD51AFB9204008FA782 /* AppDelegate.swift */, - 607FACD71AFB9204008FA782 /* ViewController.swift */, - 607FACD91AFB9204008FA782 /* Main.storyboard */, - 607FACDC1AFB9204008FA782 /* Images.xcassets */, + 84788C7A1C2B9FAB00C4DAF4 /* AppDelegate.swift */, + 84788C731C2B9F1E00C4DAF4 /* Assets.xcassets */, + 84788C741C2B9F1E00C4DAF4 /* MainVC.swift */, + 84788C7C1C2BCDEB00C4DAF4 /* Main.storyboard */, 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, + 84788C821C2CED6200C4DAF4 /* SideMenuManager.swift */, 607FACD31AFB9204008FA782 /* Supporting Files */, ); name = "Example for SideMenu"; @@ -200,7 +203,7 @@ ); name = SideMenu_Tests; productName = Tests; - productReference = 607FACE51AFB9204008FA782 /* Tests.xctest */; + productReference = 607FACE51AFB9204008FA782 /* SideMenu_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -209,7 +212,8 @@ 607FACC81AFB9204008FA782 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { @@ -245,9 +249,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, + 84788C7D1C2BCDEB00C4DAF4 /* Main.storyboard in Resources */, + 84788C771C2B9F1E00C4DAF4 /* Assets.xcassets in Resources */, 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -358,8 +362,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, + 84788C7B1C2B9FAB00C4DAF4 /* AppDelegate.swift in Sources */, + 84788C831C2CED6200C4DAF4 /* SideMenuManager.swift in Sources */, + 84788C781C2B9F1E00C4DAF4 /* MainVC.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -382,14 +387,6 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 607FACD91AFB9204008FA782 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 607FACDA1AFB9204008FA782 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { isa = PBXVariantGroup; children = ( @@ -422,6 +419,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -487,10 +485,13 @@ baseConfigurationReference = 6DDF7DF7E11CBCA539322BE8 /* Pods-SideMenu_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = SideMenu/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; }; @@ -499,9 +500,11 @@ baseConfigurationReference = 534FE89D0A72943B3C15B028 /* Pods-SideMenu_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = SideMenu/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -521,6 +524,7 @@ ); 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)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SideMenu_Example.app/SideMenu_Example"; }; @@ -537,6 +541,7 @@ ); 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)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SideMenu_Example.app/SideMenu_Example"; }; diff --git a/Example/SideMenu.xcodeproj/xcshareddata/xcschemes/SideMenu-Example.xcscheme b/Example/SideMenu.xcodeproj/xcshareddata/xcschemes/SideMenu-Example.xcscheme index 64447e9..52a7149 100644 --- a/Example/SideMenu.xcodeproj/xcshareddata/xcschemes/SideMenu-Example.xcscheme +++ b/Example/SideMenu.xcodeproj/xcshareddata/xcschemes/SideMenu-Example.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -62,15 +62,18 @@ ReferencedContainer = "container:SideMenu.xcodeproj"> + + @@ -86,10 +89,10 @@ diff --git a/Example/SideMenu.xcworkspace/contents.xcworkspacedata b/Example/SideMenu.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ac37ec3 --- /dev/null +++ b/Example/SideMenu.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/SideMenu/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/SideMenu/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 99% rename from Example/SideMenu/Images.xcassets/AppIcon.appiconset/Contents.json rename to Example/SideMenu/Assets.xcassets/AppIcon.appiconset/Contents.json index d3942e9..118c98f 100644 --- a/Example/SideMenu/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/SideMenu/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -35,4 +35,4 @@ "version" : 1, "author" : "xcode" } -} +} \ No newline at end of file diff --git a/Example/SideMenu/Assets.xcassets/Contents.json b/Example/SideMenu/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Example/SideMenu/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/SideMenu/Assets.xcassets/background.imageset/Contents.json b/Example/SideMenu/Assets.xcassets/background.imageset/Contents.json new file mode 100644 index 0000000..c1e6449 --- /dev/null +++ b/Example/SideMenu/Assets.xcassets/background.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "stars.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/SideMenu/Assets.xcassets/background.imageset/stars.png b/Example/SideMenu/Assets.xcassets/background.imageset/stars.png new file mode 100644 index 0000000..0a9b4c4 Binary files /dev/null and b/Example/SideMenu/Assets.xcassets/background.imageset/stars.png differ diff --git a/Example/SideMenu/Base.lproj/LaunchScreen.xib b/Example/SideMenu/Base.lproj/LaunchScreen.xib index 79facec..f95c1e9 100644 --- a/Example/SideMenu/Base.lproj/LaunchScreen.xib +++ b/Example/SideMenu/Base.lproj/LaunchScreen.xib @@ -1,8 +1,8 @@ - + - - + + @@ -11,31 +11,23 @@ - - + + + - - - - - - + + + + + + + diff --git a/Example/SideMenu/Base.lproj/Main.storyboard b/Example/SideMenu/Base.lproj/Main.storyboard deleted file mode 100644 index 52ea29e..0000000 --- a/Example/SideMenu/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/SideMenu/Info.plist b/Example/SideMenu/Info.plist index 2960c1d..fab4b93 100644 --- a/Example/SideMenu/Info.plist +++ b/Example/SideMenu/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -30,10 +30,15 @@ armv7 + UIStatusBarStyle + UIStatusBarStyleLightContent UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIViewControllerBasedStatusBarAppearance + diff --git a/Example/SideMenu/Main.storyboard b/Example/SideMenu/Main.storyboard new file mode 100644 index 0000000..bb5b836 --- /dev/null +++ b/Example/SideMenu/Main.storyboard @@ -0,0 +1,659 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/SideMenu/MainVC.swift b/Example/SideMenu/MainVC.swift new file mode 100644 index 0000000..8bdc568 --- /dev/null +++ b/Example/SideMenu/MainVC.swift @@ -0,0 +1,86 @@ +// +// MainVC.swift +// +// Created by Jon Kent on 11/12/15. +// Copyright © 2015 Jon Kent. All rights reserved. +// + +import UIKit + +class MainVC: UIViewController { + + @IBOutlet private weak var presentModeSegmentedControl:UISegmentedControl! + @IBOutlet private weak var blurSegmentControl:UISegmentedControl! + @IBOutlet private weak var darknessSlider:UISlider! + @IBOutlet private weak var shadowOpacitySlider:UISlider! + @IBOutlet private weak var screenWidthSlider:UISlider! + @IBOutlet private weak var shrinkFactorSlider:UISlider! + @IBOutlet private weak var blackOutStatusBar:UISwitch! + + override func viewDidLoad() { + super.viewDidLoad() + + setupSideMenu() + setDefaults() + } + + private func setupSideMenu() { + SideMenuManager.menuLeftNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UILeftSideMenuNavigationController") as? UILeftSideMenuNavigationController + SideMenuManager.menuRightNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UIRightSideMenuNavigationController") as? UIRightSideMenuNavigationController + SideMenuManager.menuAddPanGestureToPresent(toView: self.navigationController!.navigationBar) + SideMenuManager.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view) + SideMenuManager.menuAnimationShrinkBackgroundColor = UIColor(patternImage: UIImage(named: "background")!) + } + + private func setDefaults() { + let modes:[SideMenuManager.MenuPresentMode] = [.MenuSlideIn, .ViewSlideOut, .MenuDissolveIn] + presentModeSegmentedControl.selectedSegmentIndex = modes.indexOf(SideMenuManager.menuPresentMode)! + + let styles:[UIBlurEffectStyle] = [.Dark, .Light, .ExtraLight] + if let menuBlurEffectStyle = SideMenuManager.menuBlurEffectStyle { + blurSegmentControl.selectedSegmentIndex = styles.indexOf(menuBlurEffectStyle) ?? 0 + } else { + blurSegmentControl.selectedSegmentIndex = 0 + } + + darknessSlider.value = Float(SideMenuManager.menuAnimationFadeStrength) + shadowOpacitySlider.value = Float(SideMenuManager.menuShadowOpacity) + shrinkFactorSlider.value = Float(SideMenuManager.menuAnimationShrinkStrength) + screenWidthSlider.value = Float(SideMenuManager.menuWidth / view.frame.width) + blackOutStatusBar.on = SideMenuManager.menuFadeStatusBar + } + + @IBAction private func changeSegment(segmentControl: UISegmentedControl) { + switch segmentControl { + case presentModeSegmentedControl: + let modes:[SideMenuManager.MenuPresentMode] = [.MenuSlideIn, .ViewSlideOut, .MenuDissolveIn] + SideMenuManager.menuPresentMode = modes[segmentControl.selectedSegmentIndex] + case blurSegmentControl: + if segmentControl.selectedSegmentIndex == 0 { + SideMenuManager.menuBlurEffectStyle = nil + } else { + let styles:[UIBlurEffectStyle] = [.Dark, .Light, .ExtraLight] + SideMenuManager.menuBlurEffectStyle = styles[segmentControl.selectedSegmentIndex - 1] + } + default: break; + } + } + + @IBAction private func changeSlider(slider: UISlider) { + switch slider { + case darknessSlider: + SideMenuManager.menuAnimationFadeStrength = CGFloat(slider.value) + case shadowOpacitySlider: + SideMenuManager.menuShadowOpacity = slider.value + case shrinkFactorSlider: + SideMenuManager.menuAnimationShrinkStrength = CGFloat(slider.value) + case screenWidthSlider: + SideMenuManager.menuWidth = view.frame.width * CGFloat(slider.value) + default: break; + } + } + + @IBAction private func changeSwitch(switchControl: UISwitch) { + SideMenuManager.menuFadeStatusBar = switchControl.on + } +} \ No newline at end of file diff --git a/Example/SideMenu/SideMenuManager.swift b/Example/SideMenu/SideMenuManager.swift new file mode 100644 index 0000000..a400267 --- /dev/null +++ b/Example/SideMenu/SideMenuManager.swift @@ -0,0 +1,757 @@ +// +// SideMenuManager.swift +// +// Created by Jon Kent on 12/6/15. +// Copyright © 2015 Jon Kent. All rights reserved. +// + +import UIKit + +/* Example usage: + SideMenuManager.menuLeftNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UILeftSideMenuNavigationController") as? UILeftSideMenuNavigationController + SideMenuManager.menuRightNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UIRightSideMenuNavigationController") as? UIRightSideMenuNavigationController + SideMenuManager.menuAddPanToPresentGesture(toView: self.navigationController!.navigationBar) + SideMenuManager.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view) +*/ + +private func menuViewDidAppear(navigationController: UINavigationController) { + // we had presented a view before, so lets dismiss ourselves as already acted upon + if navigationController.view.hidden { + SideMenuManager.hideMenuComplete() + navigationController.dismissViewControllerAnimated(false, completion: { () -> Void in + navigationController.view.hidden = false + }) + } +} + +private func menuViewWillDisappear(navigationController: UINavigationController) { + // when presenting a view controller from the menu, the menu view gets moved into another transition view above our transition container + // which can break the visual layout we had before. So, we move the menu view back to its original transition view to preserve it. + if !navigationController.isBeingDismissed() { + if let mainView = navigationController.presentingViewController?.view { + switch SideMenuManager.menuPresentMode { + case .ViewSlideOut: + mainView.superview?.insertSubview(navigationController.view, belowSubview: mainView) + case .MenuSlideIn, .MenuDissolveIn: + mainView.superview?.insertSubview(navigationController.view, aboveSubview: SideMenuManager.tapView) + } + } + } +} + +private func menuViewDidDisappear(navigationController: UINavigationController) { + // we're presenting a view controller from the menu, so we need to hide the menu so it isn't g when the presented view is dismissed. + if !navigationController.isBeingDismissed() { + navigationController.view.hidden = true + SideMenuManager.hideMenuAppearance() + } +} + +private func menuViewWillTransitionToSize(navigationController: UINavigationController, size: CGSize, coordinator: UIViewControllerTransitionCoordinator) { + // don't bother resizing if the view isn't visible + if navigationController.view.hidden { + return + } + + SideMenuManager.statusBarView?.hidden = true + coordinator.animateAlongsideTransition({ (context) -> Void in + SideMenuManager.presentMenuAppearance(forSize: size) + }) { (context) -> Void in + SideMenuManager.statusBarView?.hidden = false + } +} + +private func menuPushViewController(navigationController: UINavigationController, viewController: UIViewController, animated: Bool) { + if let menuViewController: UINavigationController = SideMenuManager.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController : SideMenuManager.menuRightNavigationController { + if let presentingViewController = menuViewController.presentingViewController as? UINavigationController { + + // to avoid overlapping dismiss & pop/push calls, create a transaction block where the menu + // is dismissed after showing the appropriate screen + CATransaction.begin() + CATransaction.setCompletionBlock( { () -> Void in + navigationController.dismissViewControllerAnimated(true, completion: nil) + navigationController.visibleViewController?.viewWillAppear(false) // Hack: force selection to get cleared on UITableViewControllers when reappearing using custom transitions + }) + + UIView.animateWithDuration(SideMenuManager.menuAnimationDismissDuration, animations: { () -> Void in + SideMenuManager.hideMenuAppearance() + }) + + if SideMenuManager.menuAllowPopIfPossible { + for subViewController in presentingViewController.viewControllers { + if subViewController.dynamicType == viewController.dynamicType { + presentingViewController.popToViewController(subViewController, animated: animated) + CATransaction.commit() + return + } + } + } + if !SideMenuManager.menuAllowPushOfSameClassTwice { + if presentingViewController.viewControllers.last?.dynamicType == viewController.dynamicType { + CATransaction.commit() + return + } + } + + presentingViewController.pushViewController(viewController, animated: animated) + CATransaction.commit() + } else { + menuViewController.presentViewController(viewController, animated: animated, completion: nil) + print("Warning: attempted to push a ViewController from a ViewController that doesn't have a NavigationController. It will be presented it instead.") + } + } +} + +class UILeftSideMenuNavigationController: UINavigationController { + + override func viewDidLoad() { + super.viewDidLoad() + + SideMenuManager.menuLeftNavigationController = self + } + + override func viewDidAppear(animated: Bool) { + super.viewDidAppear(animated) + + menuViewDidAppear(self) + } + + override func viewWillDisappear(animated: Bool) { + super.viewWillDisappear(animated) + + menuViewWillDisappear(self) + } + + override func viewDidDisappear(animated: Bool) { + super.viewDidDisappear(animated) + + menuViewDidDisappear(self) + } + + override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { + super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator) + + menuViewWillTransitionToSize(self, size: size, coordinator: coordinator) + } + + override func pushViewController(viewController: UIViewController, animated: Bool) { + menuPushViewController(self, viewController: viewController, animated: animated) + } +} + +class UIRightSideMenuNavigationController: UINavigationController { + + override func viewDidLoad() { + super.viewDidLoad() + + SideMenuManager.menuRightNavigationController = self + } + + override func viewDidAppear(animated: Bool) { + super.viewDidAppear(animated) + + menuViewDidAppear(self) + } + + override func viewWillDisappear(animated: Bool) { + super.viewWillDisappear(animated) + + menuViewWillDisappear(self) + } + + override func viewDidDisappear(animated: Bool) { + super.viewDidDisappear(animated) + + menuViewDidDisappear(self) + } + + override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { + super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator) + + menuViewWillTransitionToSize(self, size: size, coordinator: coordinator) + } + + override func pushViewController(viewController: UIViewController, animated: Bool) { + menuPushViewController(self, viewController: viewController, animated: animated) + } +} + +class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate { + + enum MenuPresentMode { + case MenuSlideIn + case ViewSlideOut + case MenuDissolveIn + } + + private static var presenting = false + private static var interactive = false + private static var presentDirection: UIRectEdge = .Left; + private static weak var tapView: UIView! + private static weak var statusBarView: UIView? + private static let singleton = SideMenuManager() + private static var originalLeftMenuBackgroundColor:UIColor? + private static var originalRightMenuBackgroundColor:UIColor? + + static var menuPresentMode:MenuPresentMode = .ViewSlideOut + static var menuAllowPushOfSameClassTwice = true + static var menuAllowPopIfPossible = false + static var menuWidth: CGFloat = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.75), 240) + static var menuAnimationPresentDuration = 0.35 + static var menuAnimationDismissDuration = 0.35 + static var menuAnimationFadeStrength: CGFloat = 0 + static var menuAnimationShrinkStrength: CGFloat = 1 + static var menuAnimationShrinkBackgroundColor: UIColor? + static var menuShadowOpacity:Float = 0.5 + static var menuShadowColor = UIColor.blackColor() + static var menuShadowRadius: CGFloat = 5 + static weak var menuLeftSwipeToDismissGesture:UIPanGestureRecognizer? + static weak var menuRightSwipeToDismissGesture:UIPanGestureRecognizer? + static var menuParallaxStrength:Int = 0 + static var menuFadeStatusBar = true + + static var menuBlurEffectStyle: UIBlurEffectStyle? { + didSet { + updateMenuBlurIfNecessary() + } + } + + // prevent instantiation + private override init() {} + + static var menuLeftNavigationController: UILeftSideMenuNavigationController? { + willSet { + if menuLeftNavigationController != nil { + let originalBlurEffectStyle = menuBlurEffectStyle + menuBlurEffectStyle = nil + updateMenuBlurIfNecessary() + menuBlurEffectStyle = originalBlurEffectStyle + } + } + didSet { + if let menuLeftNavigationController = menuLeftNavigationController { + let exitPanGesture = UIPanGestureRecognizer() + exitPanGesture.addTarget(self, action:"handleHideMenuPan:") + menuLeftNavigationController.view.addGestureRecognizer(exitPanGesture) + menuLeftNavigationController.transitioningDelegate = singleton + menuLeftSwipeToDismissGesture = exitPanGesture + updateMenuBlurIfNecessary() + } + } + } + + static var menuRightNavigationController: UIRightSideMenuNavigationController? { + willSet { + if menuRightNavigationController != nil { + let originalBlurEffectStyle = menuBlurEffectStyle + menuBlurEffectStyle = nil + updateMenuBlurIfNecessary() + menuBlurEffectStyle = originalBlurEffectStyle + } + } + didSet { + if let menuRightNavigationController = menuRightNavigationController { + let exitPanGesture = UIPanGestureRecognizer() + exitPanGesture.addTarget(self, action:"handleHideMenuPan:") + menuRightNavigationController.view.addGestureRecognizer(exitPanGesture) + menuRightNavigationController.transitioningDelegate = singleton + menuRightSwipeToDismissGesture = exitPanGesture + updateMenuBlurIfNecessary() + } + } + } + + private class func updateMenuBlurIfNecessary() { + if let menuLeftNavigationController = menuLeftNavigationController, let view = menuLeftNavigationController.visibleViewController?.view { + if !UIAccessibilityIsReduceTransparencyEnabled() && menuBlurEffectStyle != nil { + if originalLeftMenuBackgroundColor == nil { + originalLeftMenuBackgroundColor = view.backgroundColor + } + setupMenuBlurForMenu(menuLeftNavigationController) + } else if originalLeftMenuBackgroundColor != nil { + removeMenuBlurForMenu(menuLeftNavigationController) + view.backgroundColor = originalLeftMenuBackgroundColor! + originalLeftMenuBackgroundColor = nil + } + } + + if let menuRightNavigationController = menuRightNavigationController, let view = menuRightNavigationController.visibleViewController?.view { + if !UIAccessibilityIsReduceTransparencyEnabled() && menuBlurEffectStyle != nil { + if originalRightMenuBackgroundColor == nil { + originalRightMenuBackgroundColor = view.backgroundColor + } + setupMenuBlurForMenu(menuRightNavigationController) + } else if originalRightMenuBackgroundColor != nil { + removeMenuBlurForMenu(menuRightNavigationController) + view.backgroundColor = originalRightMenuBackgroundColor! + originalRightMenuBackgroundColor = nil + } + } + } + + private class func setupMenuBlurForMenu(forMenu: UINavigationController) { + removeMenuBlurForMenu(forMenu) + if let tableViewController = forMenu.visibleViewController as? UITableViewController { + tableViewController.tableView.backgroundColor = UIColor.clearColor() + + let blurEffect = UIBlurEffect(style: menuBlurEffectStyle!) + tableViewController.tableView.backgroundView = UIVisualEffectView(effect: blurEffect) + tableViewController.tableView.separatorEffect = UIVibrancyEffect(forBlurEffect: blurEffect) + tableViewController.tableView.reloadData() + } else if let viewController = forMenu.visibleViewController { + viewController.view.backgroundColor = UIColor.clearColor() + + let blurView = UIVisualEffectView(effect: UIBlurEffect(style: menuBlurEffectStyle!)) + blurView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth] + blurView.frame = viewController.view.bounds + + viewController.view.insertSubview(blurView, atIndex: 0) + } + } + + private class func removeMenuBlurForMenu(forMenu: UINavigationController) { + if let tableViewController = forMenu.visibleViewController as? UITableViewController { + tableViewController.tableView.backgroundView = nil + tableViewController.tableView.separatorEffect = nil + tableViewController.tableView.reloadData() + } else if let viewController = forMenu.visibleViewController { + if let blurView = viewController.view.subviews[0] as? UIVisualEffectView { + blurView.removeFromSuperview() + } + } + } + + private static var viewControllerForPresentedMenu: UIViewController? { + get { + return menuLeftNavigationController?.presentingViewController != nil ? menuLeftNavigationController?.presentingViewController : menuRightNavigationController?.presentingViewController + } + } + + class func menuAddScreenEdgePanGesturesToPresent(toView toView: UIView, forMenu:UIRectEdge? = nil) -> [UIScreenEdgePanGestureRecognizer] { + + var array = [UIScreenEdgePanGestureRecognizer]() + + if forMenu != .Right { + let leftScreenEdgeGestureRecognizer = UIScreenEdgePanGestureRecognizer() + leftScreenEdgeGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:") + leftScreenEdgeGestureRecognizer.edges = .Left + leftScreenEdgeGestureRecognizer.cancelsTouchesInView = true + toView.addGestureRecognizer(leftScreenEdgeGestureRecognizer) + array.append(leftScreenEdgeGestureRecognizer) + } + + if forMenu != .Left { + let rightScreenEdgeGestureRecognizer = UIScreenEdgePanGestureRecognizer() + rightScreenEdgeGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:") + rightScreenEdgeGestureRecognizer.edges = .Right + rightScreenEdgeGestureRecognizer.cancelsTouchesInView = true + toView.addGestureRecognizer(rightScreenEdgeGestureRecognizer) + array.append(rightScreenEdgeGestureRecognizer) + } + + return array + } + + class func menuAddPanGestureToPresent(toView toView: UIView) -> UIPanGestureRecognizer { + let panGestureRecognizer = UIPanGestureRecognizer() + panGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:") + toView.addGestureRecognizer(panGestureRecognizer) + + return panGestureRecognizer + } + + class func handlePresentMenuPan(pan: UIPanGestureRecognizer) { + // how much distance have we panned in reference to the parent view? + if let view = viewControllerForPresentedMenu != nil ? viewControllerForPresentedMenu?.view : pan.view { + let transform = view.transform + view.transform = CGAffineTransformIdentity + let translation = pan.translationInView(pan.view!) + view.transform = transform + + // do some math to translate this to a percentage based value + if !interactive { + if translation.x == 0 { + return // not sure which way the user is swiping yet, so do nothing + } + + if let edge = pan as? UIScreenEdgePanGestureRecognizer { + presentDirection = edge.edges == .Left ? .Left : .Right + } else { + presentDirection = translation.x > 0 ? .Left : .Right + } + + if let menuViewController: UINavigationController = presentDirection == .Left ? menuLeftNavigationController : menuRightNavigationController { + interactive = true + if let visibleViewController = visibleViewController() { + visibleViewController.presentViewController(menuViewController, animated: true, completion: nil) + } + } + } + + let direction:CGFloat = presentDirection == .Left ? 1 : -1 + let distance = translation.x / menuWidth + // now lets deal with different states that the gesture recognizer sends + switch (pan.state) { + case .Began, .Changed: + if pan is UIScreenEdgePanGestureRecognizer { + singleton.updateInteractiveTransition(min(distance * direction, 1)) + } else if distance > 0 && presentDirection == .Right && menuLeftNavigationController != nil { + presentDirection = .Left + singleton.cancelInteractiveTransition() + viewControllerForPresentedMenu?.presentViewController(menuLeftNavigationController!, animated: true, completion: nil) + } else if distance < 0 && presentDirection == .Left && menuRightNavigationController != nil { + presentDirection = .Right + singleton.cancelInteractiveTransition() + viewControllerForPresentedMenu?.presentViewController(menuRightNavigationController!, animated: true, completion: nil) + } else { + singleton.updateInteractiveTransition(min(distance * direction, 1)) + } + default: + interactive = false + view.transform = CGAffineTransformIdentity + let velocity = pan.velocityInView(pan.view!).x * direction + view.transform = transform + if velocity >= 100 || velocity >= -50 && abs(distance) >= 0.5 { + singleton.finishInteractiveTransition() + } else { + singleton.cancelInteractiveTransition() + } + } + } + } + + class func handleHideMenuPan(pan: UIPanGestureRecognizer) { + + let translation = pan.translationInView(pan.view!) + let direction:CGFloat = presentDirection == .Left ? -1 : 1 + let distance = translation.x / menuWidth * direction + + switch (pan.state) { + + case .Began: + interactive = true + viewControllerForPresentedMenu?.dismissViewControllerAnimated(true, completion: nil) + case .Changed: + singleton.updateInteractiveTransition(max(min(distance, 1), 0)) + default: + interactive = false + let velocity = pan.velocityInView(pan.view!).x * direction + if velocity >= 100 || velocity >= -50 && distance >= 0.5 { + singleton.finishInteractiveTransition() + } + else { + singleton.cancelInteractiveTransition() + } + } + } + + class func handleHideMenuTap(tap: UITapGestureRecognizer) { + viewControllerForPresentedMenu?.dismissViewControllerAnimated(true, completion: nil) + } + + private class func visibleViewController() -> UIViewController? { + return getVisibleViewControllerFrom(UIApplication.sharedApplication().keyWindow?.rootViewController) + } + + private class func getVisibleViewControllerFrom(viewController: UIViewController?) -> UIViewController? { + if let navigationController = viewController as? UINavigationController { + return getVisibleViewControllerFrom(navigationController.visibleViewController) + } else if let tabBarController = viewController as? UITabBarController { + return getVisibleViewControllerFrom(tabBarController.selectedViewController) + } else if let presentedViewController = viewController?.presentedViewController { + return getVisibleViewControllerFrom(presentedViewController) + } + + return viewController + } + + private class func hideMenuAppearance() { + let mainViewController = viewControllerForPresentedMenu! + let menuView = presentDirection == .Left ? menuLeftNavigationController!.view : menuRightNavigationController!.view + menuView.transform = CGAffineTransformIdentity + mainViewController.view.transform = CGAffineTransformIdentity + mainViewController.view.alpha = 1 + tapView.frame = CGRectMake(0, 0, mainViewController.view.frame.width, mainViewController.view.frame.height) + menuView.frame.origin.y = 0 + menuView.frame.size.width = menuWidth + menuView.frame.size.height = mainViewController.view.frame.height + statusBarView?.frame = UIApplication.sharedApplication().statusBarFrame + statusBarView?.alpha = 0 + + switch menuPresentMode { + + case .ViewSlideOut: + menuView.alpha = 1 - menuAnimationFadeStrength + menuView.frame.origin.x = presentDirection == .Left ? 0 : mainViewController.view.frame.width - menuWidth + mainViewController.view.frame.origin.x = 0 + menuView.transform = CGAffineTransformMakeScale(menuAnimationShrinkStrength, menuAnimationShrinkStrength) + + case .MenuSlideIn: + menuView.alpha = 1 + menuView.frame.origin.x = presentDirection == .Left ? -menuView.frame.width : mainViewController.view.frame.width + + case .MenuDissolveIn: + menuView.alpha = 0 + menuView.frame.origin.x = presentDirection == .Left ? 0 : mainViewController.view.frame.width - menuWidth + mainViewController.view.frame.origin.x = 0 + } + } + + private class func hideMenuComplete() { + let mainViewController = viewControllerForPresentedMenu! + let menuView = presentDirection == .Left ? menuLeftNavigationController!.view : menuRightNavigationController!.view + tapView.removeFromSuperview() + statusBarView?.removeFromSuperview() + mainViewController.view.motionEffects.removeAll() + mainViewController.view.layer.shadowOpacity = 0 + menuView.layer.shadowOpacity = 0 + NSNotificationCenter.defaultCenter().removeObserver(singleton) + if let topNavigationController = mainViewController as? UINavigationController { + topNavigationController.interactivePopGestureRecognizer!.enabled = true + } + } + + private class func presentMenuAppearance(forSize size: CGSize = UIScreen.mainScreen().bounds.size) { + let mainViewController = viewControllerForPresentedMenu! + if let menuView = presentDirection == .Left ? menuLeftNavigationController?.view : menuRightNavigationController?.view { + menuView.transform = CGAffineTransformIdentity + mainViewController.view.transform = CGAffineTransformIdentity + menuView.frame.size.width = menuWidth + menuView.frame.size.height = size.height + menuView.frame.origin.x = presentDirection == .Left ? 0 : size.width - menuWidth + statusBarView?.frame = UIApplication.sharedApplication().statusBarFrame + statusBarView?.alpha = 1 + + switch menuPresentMode { + + case .ViewSlideOut: + menuView.alpha = 1 + let direction:CGFloat = presentDirection == .Left ? 1 : -1 + mainViewController.view.frame.origin.x = direction * (menuView.frame.width) + mainViewController.view.layer.shadowColor = menuShadowColor.CGColor + mainViewController.view.layer.shadowRadius = menuShadowRadius + mainViewController.view.layer.shadowOpacity = menuShadowOpacity + mainViewController.view.layer.shadowOffset = CGSizeMake(0, 0) + + case .MenuSlideIn, .MenuDissolveIn: + menuView.alpha = 1 + menuView.layer.shadowColor = menuShadowColor.CGColor + menuView.layer.shadowRadius = menuShadowRadius + menuView.layer.shadowOpacity = menuShadowOpacity + menuView.layer.shadowOffset = CGSizeMake(0, 0) + mainViewController.view.frame = CGRectMake(0, 0, size.width, size.height) + mainViewController.view.transform = CGAffineTransformMakeScale(menuAnimationShrinkStrength, menuAnimationShrinkStrength) + mainViewController.view.alpha = 1 - menuAnimationFadeStrength + } + } + } + + private class func presentMenuComplete() { + let mainViewController = viewControllerForPresentedMenu! + switch menuPresentMode { + case .MenuSlideIn, .MenuDissolveIn: + if menuParallaxStrength != 0 { + let horizontal = UIInterpolatingMotionEffect(keyPath: "center.x", type: .TiltAlongHorizontalAxis) + horizontal.minimumRelativeValue = -menuParallaxStrength + horizontal.maximumRelativeValue = menuParallaxStrength + + let vertical = UIInterpolatingMotionEffect(keyPath: "center.y", type: .TiltAlongVerticalAxis) + vertical.minimumRelativeValue = -menuParallaxStrength + vertical.maximumRelativeValue = menuParallaxStrength + + let group = UIMotionEffectGroup() + group.motionEffects = [horizontal, vertical] + mainViewController.view.addMotionEffect(group) + } + case .ViewSlideOut: break; + } + if let topNavigationController = mainViewController as? UINavigationController { + topNavigationController.interactivePopGestureRecognizer!.enabled = false + } + } + + // MARK: UIViewControllerAnimatedTransitioning protocol methods + + // animate a change from one viewcontroller to another + func animateTransition(transitionContext: UIViewControllerContextTransitioning) { + + // get reference to our fromView, toView and the container view that we should perform the transition in + let container = transitionContext.containerView()! + if let menuShrinkBackgroundColor = SideMenuManager.menuAnimationShrinkBackgroundColor { + container.backgroundColor = menuShrinkBackgroundColor + } + + // create a tuple of our screens + let screens : (from:UIViewController, to:UIViewController) = (transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)!, transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)!) + + // assign references to our menu view controller and the 'bottom' view controller from the tuple + // remember that our menuViewController will alternate between the from and to view controller depending if we're presenting or dismissing + let menuViewController = (!SideMenuManager.presenting ? screens.from : screens.to) + let topViewController = !SideMenuManager.presenting ? screens.to : screens.from + + let menuView = menuViewController.view + let topView = topViewController.view + + // prepare menu items to slide in + if SideMenuManager.presenting { + let tapView = UIView() + tapView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth] + let exitPanGesture = UIPanGestureRecognizer() + exitPanGesture.addTarget(SideMenuManager.self, action:"handleHideMenuPan:") + let exitTapGesture = UITapGestureRecognizer() + exitTapGesture.addTarget(SideMenuManager.self, action: "handleHideMenuTap:") + tapView.addGestureRecognizer(exitPanGesture) + tapView.addGestureRecognizer(exitTapGesture) + + // add the both views to our view controller + switch SideMenuManager.menuPresentMode { + case .ViewSlideOut: + container.addSubview(menuView) + container.addSubview(topView) + topView.addSubview(tapView) + case .MenuSlideIn, .MenuDissolveIn: + container.addSubview(topView) + container.addSubview(tapView) + container.addSubview(menuView) + } + + if SideMenuManager.menuFadeStatusBar { + let blackBar = UIView() + if let menuShrinkBackgroundColor = SideMenuManager.menuAnimationShrinkBackgroundColor { + blackBar.backgroundColor = menuShrinkBackgroundColor + } else { + blackBar.backgroundColor = UIColor.blackColor() + } + blackBar.userInteractionEnabled = false + container.addSubview(blackBar) + SideMenuManager.statusBarView = blackBar + } + SideMenuManager.tapView = tapView + + SideMenuManager.hideMenuAppearance() // offstage for interactive + + NSNotificationCenter.defaultCenter().addObserver(SideMenuManager.singleton, selector:"applicationDidEnterBackgroundNotification", name: UIApplicationDidEnterBackgroundNotification, object: nil) + } + + // perform the animation! + let duration = transitionDuration(transitionContext) + let options: UIViewAnimationOptions = SideMenuManager.interactive ? .CurveLinear : .CurveEaseInOut + UIView.animateWithDuration(duration, delay: 0, options: options, animations: { () -> Void in + if SideMenuManager.presenting { + SideMenuManager.presentMenuAppearance() // onstage items: slide in + } + else { + SideMenuManager.hideMenuAppearance() + } + }) { (finished) -> Void in +// if UIApplication.sharedApplication().visibleViewController!.preferredStatusBarStyle() != statusBarStyle { +// // See http://www.openradar.me/21961293 +// print("Warning: do not change the status bar style while using interactive transitions or you risk transitions not properly completing.") +// } + // tell our transitionContext object that we've finished animating + if transitionContext.transitionWasCancelled() { + if SideMenuManager.presenting { + SideMenuManager.hideMenuComplete() + } + transitionContext.completeTransition(false) + } else { + if SideMenuManager.presenting { + SideMenuManager.presentMenuComplete() + transitionContext.completeTransition(true) + switch SideMenuManager.menuPresentMode { + case .ViewSlideOut: + container.addSubview(topView) + case .MenuSlideIn, .MenuDissolveIn: + container.insertSubview(topView, atIndex: 0) + } + if let statusBarView = SideMenuManager.statusBarView { + container.bringSubviewToFront(statusBarView) + } + } else { + SideMenuManager.hideMenuComplete() + transitionContext.completeTransition(true) + menuView.removeFromSuperview() + } + } + } + } + + // return how many seconds the transiton animation will take + func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval { + return SideMenuManager.presenting ? SideMenuManager.menuAnimationPresentDuration : SideMenuManager.menuAnimationDismissDuration + } + + // MARK: UIViewControllerTransitioningDelegate protocol methods + + // return the animataor when presenting a viewcontroller + // rememeber that an animator (or animation controller) is any object that aheres to the UIViewControllerAnimatedTransitioning protocol + func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? { + SideMenuManager.presenting = true + SideMenuManager.presentDirection = presented == SideMenuManager.menuLeftNavigationController ? .Left : .Right + return self + } + + // return the animator used when dismissing from a viewcontroller + func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { + SideMenuManager.presenting = false + return self + } + + func interactionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { + // if our interactive flag is true, return the transition manager object + // otherwise return nil + return SideMenuManager.interactive ? SideMenuManager.singleton : nil + } + + func interactionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { + return SideMenuManager.interactive ? SideMenuManager.singleton : nil + } + + func applicationDidEnterBackgroundNotification() { + if let menuViewController: UINavigationController = SideMenuManager.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController : SideMenuManager.menuRightNavigationController { + SideMenuManager.hideMenuAppearance() + SideMenuManager.hideMenuComplete() + menuViewController.dismissViewControllerAnimated(false, completion: nil) + } + } + +} + +class VibrantCell: UITableViewCell { + + private var vibrancyView:UIVisualEffectView = UIVisualEffectView() + private var vibrancySelectedBackgroundView:UIVisualEffectView = UIVisualEffectView() + private var defaultSelectedBackgroundView:UIView? + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + + vibrancyView.frame = bounds + vibrancyView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth] + for view in subviews { + vibrancyView.contentView.addSubview(view) + } + addSubview(vibrancyView) + + let blurSelectionEffect = UIBlurEffect(style: .Light) + vibrancySelectedBackgroundView.effect = blurSelectionEffect + defaultSelectedBackgroundView = selectedBackgroundView + } + + override func layoutSubviews() { + super.layoutSubviews() + + if !UIAccessibilityIsReduceTransparencyEnabled() && SideMenuManager.menuBlurEffectStyle != nil { + let blurEffect = UIBlurEffect(style: SideMenuManager.menuBlurEffectStyle!) + vibrancyView.effect = UIVibrancyEffect(forBlurEffect: blurEffect) + + if selectedBackgroundView != nil && selectedBackgroundView != vibrancySelectedBackgroundView { + vibrancySelectedBackgroundView.contentView.addSubview(selectedBackgroundView!) + selectedBackgroundView = vibrancySelectedBackgroundView + } + } else { + vibrancyView.effect = nil + selectedBackgroundView = defaultSelectedBackgroundView + } + } +} \ No newline at end of file diff --git a/Example/SideMenu/ViewController.swift b/Example/SideMenu/ViewController.swift deleted file mode 100644 index 2b2c01b..0000000 --- a/Example/SideMenu/ViewController.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// ViewController.swift -// SideMenu -// -// Created by jonkykong on 12/23/2015. -// Copyright (c) 2015 jonkykong. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} - diff --git a/Example/Tests/Info.plist b/Example/Tests/Info.plist index ee0a311..ba72822 100644 --- a/Example/Tests/Info.plist +++ b/Example/Tests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.cocoapods.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Pod/Classes/ReplaceMe.swift b/Pod/Classes/ReplaceMe.swift deleted file mode 100644 index e69de29..0000000 diff --git a/Pod/Classes/SideMenuManager.swift b/Pod/Classes/SideMenuManager.swift new file mode 100644 index 0000000..a400267 --- /dev/null +++ b/Pod/Classes/SideMenuManager.swift @@ -0,0 +1,757 @@ +// +// SideMenuManager.swift +// +// Created by Jon Kent on 12/6/15. +// Copyright © 2015 Jon Kent. All rights reserved. +// + +import UIKit + +/* Example usage: + SideMenuManager.menuLeftNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UILeftSideMenuNavigationController") as? UILeftSideMenuNavigationController + SideMenuManager.menuRightNavigationController = storyboard!.instantiateViewControllerWithIdentifier("UIRightSideMenuNavigationController") as? UIRightSideMenuNavigationController + SideMenuManager.menuAddPanToPresentGesture(toView: self.navigationController!.navigationBar) + SideMenuManager.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view) +*/ + +private func menuViewDidAppear(navigationController: UINavigationController) { + // we had presented a view before, so lets dismiss ourselves as already acted upon + if navigationController.view.hidden { + SideMenuManager.hideMenuComplete() + navigationController.dismissViewControllerAnimated(false, completion: { () -> Void in + navigationController.view.hidden = false + }) + } +} + +private func menuViewWillDisappear(navigationController: UINavigationController) { + // when presenting a view controller from the menu, the menu view gets moved into another transition view above our transition container + // which can break the visual layout we had before. So, we move the menu view back to its original transition view to preserve it. + if !navigationController.isBeingDismissed() { + if let mainView = navigationController.presentingViewController?.view { + switch SideMenuManager.menuPresentMode { + case .ViewSlideOut: + mainView.superview?.insertSubview(navigationController.view, belowSubview: mainView) + case .MenuSlideIn, .MenuDissolveIn: + mainView.superview?.insertSubview(navigationController.view, aboveSubview: SideMenuManager.tapView) + } + } + } +} + +private func menuViewDidDisappear(navigationController: UINavigationController) { + // we're presenting a view controller from the menu, so we need to hide the menu so it isn't g when the presented view is dismissed. + if !navigationController.isBeingDismissed() { + navigationController.view.hidden = true + SideMenuManager.hideMenuAppearance() + } +} + +private func menuViewWillTransitionToSize(navigationController: UINavigationController, size: CGSize, coordinator: UIViewControllerTransitionCoordinator) { + // don't bother resizing if the view isn't visible + if navigationController.view.hidden { + return + } + + SideMenuManager.statusBarView?.hidden = true + coordinator.animateAlongsideTransition({ (context) -> Void in + SideMenuManager.presentMenuAppearance(forSize: size) + }) { (context) -> Void in + SideMenuManager.statusBarView?.hidden = false + } +} + +private func menuPushViewController(navigationController: UINavigationController, viewController: UIViewController, animated: Bool) { + if let menuViewController: UINavigationController = SideMenuManager.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController : SideMenuManager.menuRightNavigationController { + if let presentingViewController = menuViewController.presentingViewController as? UINavigationController { + + // to avoid overlapping dismiss & pop/push calls, create a transaction block where the menu + // is dismissed after showing the appropriate screen + CATransaction.begin() + CATransaction.setCompletionBlock( { () -> Void in + navigationController.dismissViewControllerAnimated(true, completion: nil) + navigationController.visibleViewController?.viewWillAppear(false) // Hack: force selection to get cleared on UITableViewControllers when reappearing using custom transitions + }) + + UIView.animateWithDuration(SideMenuManager.menuAnimationDismissDuration, animations: { () -> Void in + SideMenuManager.hideMenuAppearance() + }) + + if SideMenuManager.menuAllowPopIfPossible { + for subViewController in presentingViewController.viewControllers { + if subViewController.dynamicType == viewController.dynamicType { + presentingViewController.popToViewController(subViewController, animated: animated) + CATransaction.commit() + return + } + } + } + if !SideMenuManager.menuAllowPushOfSameClassTwice { + if presentingViewController.viewControllers.last?.dynamicType == viewController.dynamicType { + CATransaction.commit() + return + } + } + + presentingViewController.pushViewController(viewController, animated: animated) + CATransaction.commit() + } else { + menuViewController.presentViewController(viewController, animated: animated, completion: nil) + print("Warning: attempted to push a ViewController from a ViewController that doesn't have a NavigationController. It will be presented it instead.") + } + } +} + +class UILeftSideMenuNavigationController: UINavigationController { + + override func viewDidLoad() { + super.viewDidLoad() + + SideMenuManager.menuLeftNavigationController = self + } + + override func viewDidAppear(animated: Bool) { + super.viewDidAppear(animated) + + menuViewDidAppear(self) + } + + override func viewWillDisappear(animated: Bool) { + super.viewWillDisappear(animated) + + menuViewWillDisappear(self) + } + + override func viewDidDisappear(animated: Bool) { + super.viewDidDisappear(animated) + + menuViewDidDisappear(self) + } + + override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { + super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator) + + menuViewWillTransitionToSize(self, size: size, coordinator: coordinator) + } + + override func pushViewController(viewController: UIViewController, animated: Bool) { + menuPushViewController(self, viewController: viewController, animated: animated) + } +} + +class UIRightSideMenuNavigationController: UINavigationController { + + override func viewDidLoad() { + super.viewDidLoad() + + SideMenuManager.menuRightNavigationController = self + } + + override func viewDidAppear(animated: Bool) { + super.viewDidAppear(animated) + + menuViewDidAppear(self) + } + + override func viewWillDisappear(animated: Bool) { + super.viewWillDisappear(animated) + + menuViewWillDisappear(self) + } + + override func viewDidDisappear(animated: Bool) { + super.viewDidDisappear(animated) + + menuViewDidDisappear(self) + } + + override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { + super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator) + + menuViewWillTransitionToSize(self, size: size, coordinator: coordinator) + } + + override func pushViewController(viewController: UIViewController, animated: Bool) { + menuPushViewController(self, viewController: viewController, animated: animated) + } +} + +class SideMenuManager: UIPercentDrivenInteractiveTransition, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate { + + enum MenuPresentMode { + case MenuSlideIn + case ViewSlideOut + case MenuDissolveIn + } + + private static var presenting = false + private static var interactive = false + private static var presentDirection: UIRectEdge = .Left; + private static weak var tapView: UIView! + private static weak var statusBarView: UIView? + private static let singleton = SideMenuManager() + private static var originalLeftMenuBackgroundColor:UIColor? + private static var originalRightMenuBackgroundColor:UIColor? + + static var menuPresentMode:MenuPresentMode = .ViewSlideOut + static var menuAllowPushOfSameClassTwice = true + static var menuAllowPopIfPossible = false + static var menuWidth: CGFloat = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.75), 240) + static var menuAnimationPresentDuration = 0.35 + static var menuAnimationDismissDuration = 0.35 + static var menuAnimationFadeStrength: CGFloat = 0 + static var menuAnimationShrinkStrength: CGFloat = 1 + static var menuAnimationShrinkBackgroundColor: UIColor? + static var menuShadowOpacity:Float = 0.5 + static var menuShadowColor = UIColor.blackColor() + static var menuShadowRadius: CGFloat = 5 + static weak var menuLeftSwipeToDismissGesture:UIPanGestureRecognizer? + static weak var menuRightSwipeToDismissGesture:UIPanGestureRecognizer? + static var menuParallaxStrength:Int = 0 + static var menuFadeStatusBar = true + + static var menuBlurEffectStyle: UIBlurEffectStyle? { + didSet { + updateMenuBlurIfNecessary() + } + } + + // prevent instantiation + private override init() {} + + static var menuLeftNavigationController: UILeftSideMenuNavigationController? { + willSet { + if menuLeftNavigationController != nil { + let originalBlurEffectStyle = menuBlurEffectStyle + menuBlurEffectStyle = nil + updateMenuBlurIfNecessary() + menuBlurEffectStyle = originalBlurEffectStyle + } + } + didSet { + if let menuLeftNavigationController = menuLeftNavigationController { + let exitPanGesture = UIPanGestureRecognizer() + exitPanGesture.addTarget(self, action:"handleHideMenuPan:") + menuLeftNavigationController.view.addGestureRecognizer(exitPanGesture) + menuLeftNavigationController.transitioningDelegate = singleton + menuLeftSwipeToDismissGesture = exitPanGesture + updateMenuBlurIfNecessary() + } + } + } + + static var menuRightNavigationController: UIRightSideMenuNavigationController? { + willSet { + if menuRightNavigationController != nil { + let originalBlurEffectStyle = menuBlurEffectStyle + menuBlurEffectStyle = nil + updateMenuBlurIfNecessary() + menuBlurEffectStyle = originalBlurEffectStyle + } + } + didSet { + if let menuRightNavigationController = menuRightNavigationController { + let exitPanGesture = UIPanGestureRecognizer() + exitPanGesture.addTarget(self, action:"handleHideMenuPan:") + menuRightNavigationController.view.addGestureRecognizer(exitPanGesture) + menuRightNavigationController.transitioningDelegate = singleton + menuRightSwipeToDismissGesture = exitPanGesture + updateMenuBlurIfNecessary() + } + } + } + + private class func updateMenuBlurIfNecessary() { + if let menuLeftNavigationController = menuLeftNavigationController, let view = menuLeftNavigationController.visibleViewController?.view { + if !UIAccessibilityIsReduceTransparencyEnabled() && menuBlurEffectStyle != nil { + if originalLeftMenuBackgroundColor == nil { + originalLeftMenuBackgroundColor = view.backgroundColor + } + setupMenuBlurForMenu(menuLeftNavigationController) + } else if originalLeftMenuBackgroundColor != nil { + removeMenuBlurForMenu(menuLeftNavigationController) + view.backgroundColor = originalLeftMenuBackgroundColor! + originalLeftMenuBackgroundColor = nil + } + } + + if let menuRightNavigationController = menuRightNavigationController, let view = menuRightNavigationController.visibleViewController?.view { + if !UIAccessibilityIsReduceTransparencyEnabled() && menuBlurEffectStyle != nil { + if originalRightMenuBackgroundColor == nil { + originalRightMenuBackgroundColor = view.backgroundColor + } + setupMenuBlurForMenu(menuRightNavigationController) + } else if originalRightMenuBackgroundColor != nil { + removeMenuBlurForMenu(menuRightNavigationController) + view.backgroundColor = originalRightMenuBackgroundColor! + originalRightMenuBackgroundColor = nil + } + } + } + + private class func setupMenuBlurForMenu(forMenu: UINavigationController) { + removeMenuBlurForMenu(forMenu) + if let tableViewController = forMenu.visibleViewController as? UITableViewController { + tableViewController.tableView.backgroundColor = UIColor.clearColor() + + let blurEffect = UIBlurEffect(style: menuBlurEffectStyle!) + tableViewController.tableView.backgroundView = UIVisualEffectView(effect: blurEffect) + tableViewController.tableView.separatorEffect = UIVibrancyEffect(forBlurEffect: blurEffect) + tableViewController.tableView.reloadData() + } else if let viewController = forMenu.visibleViewController { + viewController.view.backgroundColor = UIColor.clearColor() + + let blurView = UIVisualEffectView(effect: UIBlurEffect(style: menuBlurEffectStyle!)) + blurView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth] + blurView.frame = viewController.view.bounds + + viewController.view.insertSubview(blurView, atIndex: 0) + } + } + + private class func removeMenuBlurForMenu(forMenu: UINavigationController) { + if let tableViewController = forMenu.visibleViewController as? UITableViewController { + tableViewController.tableView.backgroundView = nil + tableViewController.tableView.separatorEffect = nil + tableViewController.tableView.reloadData() + } else if let viewController = forMenu.visibleViewController { + if let blurView = viewController.view.subviews[0] as? UIVisualEffectView { + blurView.removeFromSuperview() + } + } + } + + private static var viewControllerForPresentedMenu: UIViewController? { + get { + return menuLeftNavigationController?.presentingViewController != nil ? menuLeftNavigationController?.presentingViewController : menuRightNavigationController?.presentingViewController + } + } + + class func menuAddScreenEdgePanGesturesToPresent(toView toView: UIView, forMenu:UIRectEdge? = nil) -> [UIScreenEdgePanGestureRecognizer] { + + var array = [UIScreenEdgePanGestureRecognizer]() + + if forMenu != .Right { + let leftScreenEdgeGestureRecognizer = UIScreenEdgePanGestureRecognizer() + leftScreenEdgeGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:") + leftScreenEdgeGestureRecognizer.edges = .Left + leftScreenEdgeGestureRecognizer.cancelsTouchesInView = true + toView.addGestureRecognizer(leftScreenEdgeGestureRecognizer) + array.append(leftScreenEdgeGestureRecognizer) + } + + if forMenu != .Left { + let rightScreenEdgeGestureRecognizer = UIScreenEdgePanGestureRecognizer() + rightScreenEdgeGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:") + rightScreenEdgeGestureRecognizer.edges = .Right + rightScreenEdgeGestureRecognizer.cancelsTouchesInView = true + toView.addGestureRecognizer(rightScreenEdgeGestureRecognizer) + array.append(rightScreenEdgeGestureRecognizer) + } + + return array + } + + class func menuAddPanGestureToPresent(toView toView: UIView) -> UIPanGestureRecognizer { + let panGestureRecognizer = UIPanGestureRecognizer() + panGestureRecognizer.addTarget(self, action:"handlePresentMenuPan:") + toView.addGestureRecognizer(panGestureRecognizer) + + return panGestureRecognizer + } + + class func handlePresentMenuPan(pan: UIPanGestureRecognizer) { + // how much distance have we panned in reference to the parent view? + if let view = viewControllerForPresentedMenu != nil ? viewControllerForPresentedMenu?.view : pan.view { + let transform = view.transform + view.transform = CGAffineTransformIdentity + let translation = pan.translationInView(pan.view!) + view.transform = transform + + // do some math to translate this to a percentage based value + if !interactive { + if translation.x == 0 { + return // not sure which way the user is swiping yet, so do nothing + } + + if let edge = pan as? UIScreenEdgePanGestureRecognizer { + presentDirection = edge.edges == .Left ? .Left : .Right + } else { + presentDirection = translation.x > 0 ? .Left : .Right + } + + if let menuViewController: UINavigationController = presentDirection == .Left ? menuLeftNavigationController : menuRightNavigationController { + interactive = true + if let visibleViewController = visibleViewController() { + visibleViewController.presentViewController(menuViewController, animated: true, completion: nil) + } + } + } + + let direction:CGFloat = presentDirection == .Left ? 1 : -1 + let distance = translation.x / menuWidth + // now lets deal with different states that the gesture recognizer sends + switch (pan.state) { + case .Began, .Changed: + if pan is UIScreenEdgePanGestureRecognizer { + singleton.updateInteractiveTransition(min(distance * direction, 1)) + } else if distance > 0 && presentDirection == .Right && menuLeftNavigationController != nil { + presentDirection = .Left + singleton.cancelInteractiveTransition() + viewControllerForPresentedMenu?.presentViewController(menuLeftNavigationController!, animated: true, completion: nil) + } else if distance < 0 && presentDirection == .Left && menuRightNavigationController != nil { + presentDirection = .Right + singleton.cancelInteractiveTransition() + viewControllerForPresentedMenu?.presentViewController(menuRightNavigationController!, animated: true, completion: nil) + } else { + singleton.updateInteractiveTransition(min(distance * direction, 1)) + } + default: + interactive = false + view.transform = CGAffineTransformIdentity + let velocity = pan.velocityInView(pan.view!).x * direction + view.transform = transform + if velocity >= 100 || velocity >= -50 && abs(distance) >= 0.5 { + singleton.finishInteractiveTransition() + } else { + singleton.cancelInteractiveTransition() + } + } + } + } + + class func handleHideMenuPan(pan: UIPanGestureRecognizer) { + + let translation = pan.translationInView(pan.view!) + let direction:CGFloat = presentDirection == .Left ? -1 : 1 + let distance = translation.x / menuWidth * direction + + switch (pan.state) { + + case .Began: + interactive = true + viewControllerForPresentedMenu?.dismissViewControllerAnimated(true, completion: nil) + case .Changed: + singleton.updateInteractiveTransition(max(min(distance, 1), 0)) + default: + interactive = false + let velocity = pan.velocityInView(pan.view!).x * direction + if velocity >= 100 || velocity >= -50 && distance >= 0.5 { + singleton.finishInteractiveTransition() + } + else { + singleton.cancelInteractiveTransition() + } + } + } + + class func handleHideMenuTap(tap: UITapGestureRecognizer) { + viewControllerForPresentedMenu?.dismissViewControllerAnimated(true, completion: nil) + } + + private class func visibleViewController() -> UIViewController? { + return getVisibleViewControllerFrom(UIApplication.sharedApplication().keyWindow?.rootViewController) + } + + private class func getVisibleViewControllerFrom(viewController: UIViewController?) -> UIViewController? { + if let navigationController = viewController as? UINavigationController { + return getVisibleViewControllerFrom(navigationController.visibleViewController) + } else if let tabBarController = viewController as? UITabBarController { + return getVisibleViewControllerFrom(tabBarController.selectedViewController) + } else if let presentedViewController = viewController?.presentedViewController { + return getVisibleViewControllerFrom(presentedViewController) + } + + return viewController + } + + private class func hideMenuAppearance() { + let mainViewController = viewControllerForPresentedMenu! + let menuView = presentDirection == .Left ? menuLeftNavigationController!.view : menuRightNavigationController!.view + menuView.transform = CGAffineTransformIdentity + mainViewController.view.transform = CGAffineTransformIdentity + mainViewController.view.alpha = 1 + tapView.frame = CGRectMake(0, 0, mainViewController.view.frame.width, mainViewController.view.frame.height) + menuView.frame.origin.y = 0 + menuView.frame.size.width = menuWidth + menuView.frame.size.height = mainViewController.view.frame.height + statusBarView?.frame = UIApplication.sharedApplication().statusBarFrame + statusBarView?.alpha = 0 + + switch menuPresentMode { + + case .ViewSlideOut: + menuView.alpha = 1 - menuAnimationFadeStrength + menuView.frame.origin.x = presentDirection == .Left ? 0 : mainViewController.view.frame.width - menuWidth + mainViewController.view.frame.origin.x = 0 + menuView.transform = CGAffineTransformMakeScale(menuAnimationShrinkStrength, menuAnimationShrinkStrength) + + case .MenuSlideIn: + menuView.alpha = 1 + menuView.frame.origin.x = presentDirection == .Left ? -menuView.frame.width : mainViewController.view.frame.width + + case .MenuDissolveIn: + menuView.alpha = 0 + menuView.frame.origin.x = presentDirection == .Left ? 0 : mainViewController.view.frame.width - menuWidth + mainViewController.view.frame.origin.x = 0 + } + } + + private class func hideMenuComplete() { + let mainViewController = viewControllerForPresentedMenu! + let menuView = presentDirection == .Left ? menuLeftNavigationController!.view : menuRightNavigationController!.view + tapView.removeFromSuperview() + statusBarView?.removeFromSuperview() + mainViewController.view.motionEffects.removeAll() + mainViewController.view.layer.shadowOpacity = 0 + menuView.layer.shadowOpacity = 0 + NSNotificationCenter.defaultCenter().removeObserver(singleton) + if let topNavigationController = mainViewController as? UINavigationController { + topNavigationController.interactivePopGestureRecognizer!.enabled = true + } + } + + private class func presentMenuAppearance(forSize size: CGSize = UIScreen.mainScreen().bounds.size) { + let mainViewController = viewControllerForPresentedMenu! + if let menuView = presentDirection == .Left ? menuLeftNavigationController?.view : menuRightNavigationController?.view { + menuView.transform = CGAffineTransformIdentity + mainViewController.view.transform = CGAffineTransformIdentity + menuView.frame.size.width = menuWidth + menuView.frame.size.height = size.height + menuView.frame.origin.x = presentDirection == .Left ? 0 : size.width - menuWidth + statusBarView?.frame = UIApplication.sharedApplication().statusBarFrame + statusBarView?.alpha = 1 + + switch menuPresentMode { + + case .ViewSlideOut: + menuView.alpha = 1 + let direction:CGFloat = presentDirection == .Left ? 1 : -1 + mainViewController.view.frame.origin.x = direction * (menuView.frame.width) + mainViewController.view.layer.shadowColor = menuShadowColor.CGColor + mainViewController.view.layer.shadowRadius = menuShadowRadius + mainViewController.view.layer.shadowOpacity = menuShadowOpacity + mainViewController.view.layer.shadowOffset = CGSizeMake(0, 0) + + case .MenuSlideIn, .MenuDissolveIn: + menuView.alpha = 1 + menuView.layer.shadowColor = menuShadowColor.CGColor + menuView.layer.shadowRadius = menuShadowRadius + menuView.layer.shadowOpacity = menuShadowOpacity + menuView.layer.shadowOffset = CGSizeMake(0, 0) + mainViewController.view.frame = CGRectMake(0, 0, size.width, size.height) + mainViewController.view.transform = CGAffineTransformMakeScale(menuAnimationShrinkStrength, menuAnimationShrinkStrength) + mainViewController.view.alpha = 1 - menuAnimationFadeStrength + } + } + } + + private class func presentMenuComplete() { + let mainViewController = viewControllerForPresentedMenu! + switch menuPresentMode { + case .MenuSlideIn, .MenuDissolveIn: + if menuParallaxStrength != 0 { + let horizontal = UIInterpolatingMotionEffect(keyPath: "center.x", type: .TiltAlongHorizontalAxis) + horizontal.minimumRelativeValue = -menuParallaxStrength + horizontal.maximumRelativeValue = menuParallaxStrength + + let vertical = UIInterpolatingMotionEffect(keyPath: "center.y", type: .TiltAlongVerticalAxis) + vertical.minimumRelativeValue = -menuParallaxStrength + vertical.maximumRelativeValue = menuParallaxStrength + + let group = UIMotionEffectGroup() + group.motionEffects = [horizontal, vertical] + mainViewController.view.addMotionEffect(group) + } + case .ViewSlideOut: break; + } + if let topNavigationController = mainViewController as? UINavigationController { + topNavigationController.interactivePopGestureRecognizer!.enabled = false + } + } + + // MARK: UIViewControllerAnimatedTransitioning protocol methods + + // animate a change from one viewcontroller to another + func animateTransition(transitionContext: UIViewControllerContextTransitioning) { + + // get reference to our fromView, toView and the container view that we should perform the transition in + let container = transitionContext.containerView()! + if let menuShrinkBackgroundColor = SideMenuManager.menuAnimationShrinkBackgroundColor { + container.backgroundColor = menuShrinkBackgroundColor + } + + // create a tuple of our screens + let screens : (from:UIViewController, to:UIViewController) = (transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)!, transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)!) + + // assign references to our menu view controller and the 'bottom' view controller from the tuple + // remember that our menuViewController will alternate between the from and to view controller depending if we're presenting or dismissing + let menuViewController = (!SideMenuManager.presenting ? screens.from : screens.to) + let topViewController = !SideMenuManager.presenting ? screens.to : screens.from + + let menuView = menuViewController.view + let topView = topViewController.view + + // prepare menu items to slide in + if SideMenuManager.presenting { + let tapView = UIView() + tapView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth] + let exitPanGesture = UIPanGestureRecognizer() + exitPanGesture.addTarget(SideMenuManager.self, action:"handleHideMenuPan:") + let exitTapGesture = UITapGestureRecognizer() + exitTapGesture.addTarget(SideMenuManager.self, action: "handleHideMenuTap:") + tapView.addGestureRecognizer(exitPanGesture) + tapView.addGestureRecognizer(exitTapGesture) + + // add the both views to our view controller + switch SideMenuManager.menuPresentMode { + case .ViewSlideOut: + container.addSubview(menuView) + container.addSubview(topView) + topView.addSubview(tapView) + case .MenuSlideIn, .MenuDissolveIn: + container.addSubview(topView) + container.addSubview(tapView) + container.addSubview(menuView) + } + + if SideMenuManager.menuFadeStatusBar { + let blackBar = UIView() + if let menuShrinkBackgroundColor = SideMenuManager.menuAnimationShrinkBackgroundColor { + blackBar.backgroundColor = menuShrinkBackgroundColor + } else { + blackBar.backgroundColor = UIColor.blackColor() + } + blackBar.userInteractionEnabled = false + container.addSubview(blackBar) + SideMenuManager.statusBarView = blackBar + } + SideMenuManager.tapView = tapView + + SideMenuManager.hideMenuAppearance() // offstage for interactive + + NSNotificationCenter.defaultCenter().addObserver(SideMenuManager.singleton, selector:"applicationDidEnterBackgroundNotification", name: UIApplicationDidEnterBackgroundNotification, object: nil) + } + + // perform the animation! + let duration = transitionDuration(transitionContext) + let options: UIViewAnimationOptions = SideMenuManager.interactive ? .CurveLinear : .CurveEaseInOut + UIView.animateWithDuration(duration, delay: 0, options: options, animations: { () -> Void in + if SideMenuManager.presenting { + SideMenuManager.presentMenuAppearance() // onstage items: slide in + } + else { + SideMenuManager.hideMenuAppearance() + } + }) { (finished) -> Void in +// if UIApplication.sharedApplication().visibleViewController!.preferredStatusBarStyle() != statusBarStyle { +// // See http://www.openradar.me/21961293 +// print("Warning: do not change the status bar style while using interactive transitions or you risk transitions not properly completing.") +// } + // tell our transitionContext object that we've finished animating + if transitionContext.transitionWasCancelled() { + if SideMenuManager.presenting { + SideMenuManager.hideMenuComplete() + } + transitionContext.completeTransition(false) + } else { + if SideMenuManager.presenting { + SideMenuManager.presentMenuComplete() + transitionContext.completeTransition(true) + switch SideMenuManager.menuPresentMode { + case .ViewSlideOut: + container.addSubview(topView) + case .MenuSlideIn, .MenuDissolveIn: + container.insertSubview(topView, atIndex: 0) + } + if let statusBarView = SideMenuManager.statusBarView { + container.bringSubviewToFront(statusBarView) + } + } else { + SideMenuManager.hideMenuComplete() + transitionContext.completeTransition(true) + menuView.removeFromSuperview() + } + } + } + } + + // return how many seconds the transiton animation will take + func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval { + return SideMenuManager.presenting ? SideMenuManager.menuAnimationPresentDuration : SideMenuManager.menuAnimationDismissDuration + } + + // MARK: UIViewControllerTransitioningDelegate protocol methods + + // return the animataor when presenting a viewcontroller + // rememeber that an animator (or animation controller) is any object that aheres to the UIViewControllerAnimatedTransitioning protocol + func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? { + SideMenuManager.presenting = true + SideMenuManager.presentDirection = presented == SideMenuManager.menuLeftNavigationController ? .Left : .Right + return self + } + + // return the animator used when dismissing from a viewcontroller + func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { + SideMenuManager.presenting = false + return self + } + + func interactionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { + // if our interactive flag is true, return the transition manager object + // otherwise return nil + return SideMenuManager.interactive ? SideMenuManager.singleton : nil + } + + func interactionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { + return SideMenuManager.interactive ? SideMenuManager.singleton : nil + } + + func applicationDidEnterBackgroundNotification() { + if let menuViewController: UINavigationController = SideMenuManager.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController : SideMenuManager.menuRightNavigationController { + SideMenuManager.hideMenuAppearance() + SideMenuManager.hideMenuComplete() + menuViewController.dismissViewControllerAnimated(false, completion: nil) + } + } + +} + +class VibrantCell: UITableViewCell { + + private var vibrancyView:UIVisualEffectView = UIVisualEffectView() + private var vibrancySelectedBackgroundView:UIVisualEffectView = UIVisualEffectView() + private var defaultSelectedBackgroundView:UIView? + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + + vibrancyView.frame = bounds + vibrancyView.autoresizingMask = [.FlexibleHeight, .FlexibleWidth] + for view in subviews { + vibrancyView.contentView.addSubview(view) + } + addSubview(vibrancyView) + + let blurSelectionEffect = UIBlurEffect(style: .Light) + vibrancySelectedBackgroundView.effect = blurSelectionEffect + defaultSelectedBackgroundView = selectedBackgroundView + } + + override func layoutSubviews() { + super.layoutSubviews() + + if !UIAccessibilityIsReduceTransparencyEnabled() && SideMenuManager.menuBlurEffectStyle != nil { + let blurEffect = UIBlurEffect(style: SideMenuManager.menuBlurEffectStyle!) + vibrancyView.effect = UIVibrancyEffect(forBlurEffect: blurEffect) + + if selectedBackgroundView != nil && selectedBackgroundView != vibrancySelectedBackgroundView { + vibrancySelectedBackgroundView.contentView.addSubview(selectedBackgroundView!) + selectedBackgroundView = vibrancySelectedBackgroundView + } + } else { + vibrancyView.effect = nil + selectedBackgroundView = defaultSelectedBackgroundView + } + } +} \ No newline at end of file diff --git a/SideMenu.podspec b/SideMenu.podspec index 102e052..b7a35d1 100644 --- a/SideMenu.podspec +++ b/SideMenu.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.name = "SideMenu" s.version = "0.1.0" - s.summary = "A short description of SideMenu." + s.summary = "SideMenu is a simple and versatile side menu control." # This description is used to generate tags and improve search results. # * Think: What does it do? Why did you write it? What is the focus? @@ -17,13 +17,14 @@ Pod::Spec.new do |s| # * Write the description between the DESC delimiters below. # * Finally, don't worry about the indent, CocoaPods strips it! s.description = <<-DESC + SideMenu is a simple and versatile side menu control. It's highly customizable, but can also be implemented in storyboard without a single line of code. The are three standard animation styles to choose from along with several other options for further customization if desired. DESC - s.homepage = "https://github.com//SideMenu" + s.homepage = "https://github.com/jonkykong/SideMenu" # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" s.license = 'MIT' s.author = { "jonkykong" => "jpkent@gmail.com" } - s.source = { :git => "https://github.com//SideMenu.git", :tag => s.version.to_s } + s.source = { :git => "https://github.com/jonkykong/SideMenu.git", :tag => s.version.to_s } # s.social_media_url = 'https://twitter.com/' s.platform = :ios, '8.0'