diff --git a/.gitignore b/.gitignore index d534044..a4b4a49 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output +.DS_Store diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 5186d07..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.0 diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..fec5842 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,5 @@ +use_frameworks! + +target 'PullUpController_Example' do + pod 'PullUpController', :path => '../' +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..b52f761 --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - PullUpController (0.2.0) + +DEPENDENCIES: + - PullUpController (from `../`) + +EXTERNAL SOURCES: + PullUpController: + :path: "../" + +SPEC CHECKSUMS: + PullUpController: 7df1d1e15cf588cecda202879275aeafae1f8a81 + +PODFILE CHECKSUM: 33dfca2e6c424e0eb19d05b0b6293a44ee627326 + +COCOAPODS: 1.5.0 diff --git a/Example/Pods/Local Podspecs/PullUpController.podspec.json b/Example/Pods/Local Podspecs/PullUpController.podspec.json new file mode 100644 index 0000000..14d7a48 --- /dev/null +++ b/Example/Pods/Local Podspecs/PullUpController.podspec.json @@ -0,0 +1,24 @@ +{ + "name": "PullUpController", + "version": "0.2.0", + "summary": "Pull up controller with multiple sticky points like in iOS Maps.", + "homepage": "https://github.com/MarioIannotta/PullUpController", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": { + "Mario Iannotta": "info@marioiannotta.com" + }, + "source": { + "git": "https://github.com/MarioIannotta/PullUpController.git", + "tag": "0.2.0" + }, + "platforms": { + "ios": "9.0" + }, + "source_files": "PullUpController/**/*.swift", + "pod_target_xcconfig": { + "SWIFT_VERSION": "4.2" + } +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..b52f761 --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - PullUpController (0.2.0) + +DEPENDENCIES: + - PullUpController (from `../`) + +EXTERNAL SOURCES: + PullUpController: + :path: "../" + +SPEC CHECKSUMS: + PullUpController: 7df1d1e15cf588cecda202879275aeafae1f8a81 + +PODFILE CHECKSUM: 33dfca2e6c424e0eb19d05b0b6293a44ee627326 + +COCOAPODS: 1.5.0 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9bc9b90 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,592 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2955C19063DF47E923334A533D99F273 /* Pods-PullUpController_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 13054176DE8FD7682EA5876D0559D994 /* Pods-PullUpController_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8031195AB9B2F6F1140776E5BDA4A34C /* PullUpController-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 23CC8DB9AF358116FE5F077A38A91D66 /* PullUpController-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E010BBE3A0DCA0581AEA0F8AE4F58BFC /* Pods-PullUpController_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BB536EBEECAC21C47D62C1DF0D798356 /* Pods-PullUpController_Example-dummy.m */; }; + E371467500760254B3FDE804F871C01F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + F12BA5B5DD5E409088A60EE72BAD20DD /* PullUpController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AAE02B10DCAF71B4C8DA0F59BB3F4D4 /* PullUpController.swift */; }; + F698D35311AF7A82832B9961D8567285 /* PullUpController-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B8751D4FDEC7CA05976A501C20CE94 /* PullUpController-dummy.m */; }; + FB3DAB06F8E1C5D93F78EDD7AB44A67E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + F8C04CCB6BD040FDB99775BF786172D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 88A21A82856B75E85E451F68BE9B66F7; + remoteInfo = PullUpController; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1018868A7D2730AD2239974DEC2BB3EC /* Pods-PullUpController_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PullUpController_Example-frameworks.sh"; sourceTree = ""; }; + 13054176DE8FD7682EA5876D0559D994 /* Pods-PullUpController_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-PullUpController_Example-umbrella.h"; sourceTree = ""; }; + 21F144D6F2B3882BC5FD9933E31927EA /* Pods-PullUpController_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PullUpController_Example.release.xcconfig"; sourceTree = ""; }; + 23CC8DB9AF358116FE5F077A38A91D66 /* PullUpController-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PullUpController-umbrella.h"; sourceTree = ""; }; + 2C5AA6A33D63B64686BB7A5B6B78E35B /* PullUpController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PullUpController.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3C31DAEE49BC012D13D12539B321D0A3 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 40664F6BBDF3B9CD293C19FB51C67E34 /* Pods-PullUpController_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-PullUpController_Example-acknowledgements.markdown"; sourceTree = ""; }; + 483D1843AE28A17CB5FD474CEE4AF6BB /* PullUpController-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PullUpController-prefix.pch"; sourceTree = ""; }; + 50E3AF474793B9EE7DE53500151B8954 /* PullUpController.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = PullUpController.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 79F4FAA2380B9E03FF9DE31DABF0669C /* Pods-PullUpController_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PullUpController_Example-resources.sh"; sourceTree = ""; }; + 8AAE02B10DCAF71B4C8DA0F59BB3F4D4 /* PullUpController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PullUpController.swift; path = PullUpController/PullUpController.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9F56E5FB334BA9037FAA64158F05C7D6 /* PullUpController.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = PullUpController.modulemap; sourceTree = ""; }; + BB536EBEECAC21C47D62C1DF0D798356 /* Pods-PullUpController_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-PullUpController_Example-dummy.m"; sourceTree = ""; }; + BB9F8EA9DDF18EABDC0BB608ACF09769 /* Pods-PullUpController_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PullUpController_Example-acknowledgements.plist"; sourceTree = ""; }; + BF0DB4470D13394EFA28A938F1A38755 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + C5B8751D4FDEC7CA05976A501C20CE94 /* PullUpController-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PullUpController-dummy.m"; sourceTree = ""; }; + C8FA5C2BF2D4AFB310AB73255CE621BC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D755ED3538F9C07483D9251773906FF9 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DA07B630F7B2CEB638C65108EE8C97AF /* Pods_PullUpController_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PullUpController_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DCF8A9AF865D53B852B08F7253C08494 /* Pods-PullUpController_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PullUpController_Example.debug.xcconfig"; sourceTree = ""; }; + DD9FE163A3EEF9FA109361613CC05E88 /* Pods-PullUpController_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-PullUpController_Example.modulemap"; sourceTree = ""; }; + DE129AA35E6DD8D1AC44CED9A162F31F /* PullUpController.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PullUpController.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 68399AA00D7ED1FAE5D85A2356B715F7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FB3DAB06F8E1C5D93F78EDD7AB44A67E /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7956F4F535B023771CF75A099890F970 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E371467500760254B3FDE804F871C01F /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 029F610A648A9E8A3E4E658B2A17BCA7 /* Pods-PullUpController_Example */ = { + isa = PBXGroup; + children = ( + D755ED3538F9C07483D9251773906FF9 /* Info.plist */, + DD9FE163A3EEF9FA109361613CC05E88 /* Pods-PullUpController_Example.modulemap */, + 40664F6BBDF3B9CD293C19FB51C67E34 /* Pods-PullUpController_Example-acknowledgements.markdown */, + BB9F8EA9DDF18EABDC0BB608ACF09769 /* Pods-PullUpController_Example-acknowledgements.plist */, + BB536EBEECAC21C47D62C1DF0D798356 /* Pods-PullUpController_Example-dummy.m */, + 1018868A7D2730AD2239974DEC2BB3EC /* Pods-PullUpController_Example-frameworks.sh */, + 79F4FAA2380B9E03FF9DE31DABF0669C /* Pods-PullUpController_Example-resources.sh */, + 13054176DE8FD7682EA5876D0559D994 /* Pods-PullUpController_Example-umbrella.h */, + DCF8A9AF865D53B852B08F7253C08494 /* Pods-PullUpController_Example.debug.xcconfig */, + 21F144D6F2B3882BC5FD9933E31927EA /* Pods-PullUpController_Example.release.xcconfig */, + ); + name = "Pods-PullUpController_Example"; + path = "Target Support Files/Pods-PullUpController_Example"; + sourceTree = ""; + }; + 7BAD67385D0C43E7DA5CAF14D803C9B3 /* PullUpController */ = { + isa = PBXGroup; + children = ( + 8AAE02B10DCAF71B4C8DA0F59BB3F4D4 /* PullUpController.swift */, + 9338AE7FCA03262521D339B678C6DDA9 /* Pod */, + F3A348D06466386159932F373F839F8A /* Support Files */, + ); + name = PullUpController; + path = ../..; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + BB16A59184FD9A5B1E8359F87D3D0E62 /* Development Pods */, + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, + B9052FE89FBCC9091AC04DA17B7D5702 /* Products */, + 9CCF54054156BC7F2DAD2E85902CE025 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 9338AE7FCA03262521D339B678C6DDA9 /* Pod */ = { + isa = PBXGroup; + children = ( + 3C31DAEE49BC012D13D12539B321D0A3 /* LICENSE */, + 50E3AF474793B9EE7DE53500151B8954 /* PullUpController.podspec */, + BF0DB4470D13394EFA28A938F1A38755 /* README.md */, + ); + name = Pod; + sourceTree = ""; + }; + 9CCF54054156BC7F2DAD2E85902CE025 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 029F610A648A9E8A3E4E658B2A17BCA7 /* Pods-PullUpController_Example */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + B9052FE89FBCC9091AC04DA17B7D5702 /* Products */ = { + isa = PBXGroup; + children = ( + DA07B630F7B2CEB638C65108EE8C97AF /* Pods_PullUpController_Example.framework */, + 2C5AA6A33D63B64686BB7A5B6B78E35B /* PullUpController.framework */, + ); + name = Products; + sourceTree = ""; + }; + BB16A59184FD9A5B1E8359F87D3D0E62 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 7BAD67385D0C43E7DA5CAF14D803C9B3 /* PullUpController */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + isa = PBXGroup; + children = ( + D35AF013A5F0BAD4F32504907A52519E /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { + isa = PBXGroup; + children = ( + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + F3A348D06466386159932F373F839F8A /* Support Files */ = { + isa = PBXGroup; + children = ( + C8FA5C2BF2D4AFB310AB73255CE621BC /* Info.plist */, + 9F56E5FB334BA9037FAA64158F05C7D6 /* PullUpController.modulemap */, + DE129AA35E6DD8D1AC44CED9A162F31F /* PullUpController.xcconfig */, + C5B8751D4FDEC7CA05976A501C20CE94 /* PullUpController-dummy.m */, + 483D1843AE28A17CB5FD474CEE4AF6BB /* PullUpController-prefix.pch */, + 23CC8DB9AF358116FE5F077A38A91D66 /* PullUpController-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/PullUpController"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 0D41126CBF9C129313DEC023CC93CF47 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2955C19063DF47E923334A533D99F273 /* Pods-PullUpController_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5FBADA4F2CE146E6B2CDCEEB2F073F9C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8031195AB9B2F6F1140776E5BDA4A34C /* PullUpController-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 88A21A82856B75E85E451F68BE9B66F7 /* PullUpController */ = { + isa = PBXNativeTarget; + buildConfigurationList = 16FFB3C2338453E99B74D534984F78AF /* Build configuration list for PBXNativeTarget "PullUpController" */; + buildPhases = ( + 7E66410792C029213D6F33CF4D65B8F6 /* Sources */, + 68399AA00D7ED1FAE5D85A2356B715F7 /* Frameworks */, + 5FBADA4F2CE146E6B2CDCEEB2F073F9C /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PullUpController; + productName = PullUpController; + productReference = 2C5AA6A33D63B64686BB7A5B6B78E35B /* PullUpController.framework */; + productType = "com.apple.product-type.framework"; + }; + 9B7B5B1BA4CD6DBC28237C8242FDAC97 /* Pods-PullUpController_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3271BBD358556CAFA956B27A0236CA70 /* Build configuration list for PBXNativeTarget "Pods-PullUpController_Example" */; + buildPhases = ( + 05A7696B59DEBED8A9BA94BD58F3B8E9 /* Sources */, + 7956F4F535B023771CF75A099890F970 /* Frameworks */, + 0D41126CBF9C129313DEC023CC93CF47 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + F5F72EFF015DAE50ACE2F392FFEE1F81 /* PBXTargetDependency */, + ); + name = "Pods-PullUpController_Example"; + productName = "Pods-PullUpController_Example"; + productReference = DA07B630F7B2CEB638C65108EE8C97AF /* Pods_PullUpController_Example.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 1130; + TargetAttributes = { + 88A21A82856B75E85E451F68BE9B66F7 = { + LastSwiftMigration = 1020; + }; + }; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = B9052FE89FBCC9091AC04DA17B7D5702 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9B7B5B1BA4CD6DBC28237C8242FDAC97 /* Pods-PullUpController_Example */, + 88A21A82856B75E85E451F68BE9B66F7 /* PullUpController */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 05A7696B59DEBED8A9BA94BD58F3B8E9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E010BBE3A0DCA0581AEA0F8AE4F58BFC /* Pods-PullUpController_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7E66410792C029213D6F33CF4D65B8F6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F698D35311AF7A82832B9961D8567285 /* PullUpController-dummy.m in Sources */, + F12BA5B5DD5E409088A60EE72BAD20DD /* PullUpController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + F5F72EFF015DAE50ACE2F392FFEE1F81 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PullUpController; + target = 88A21A82856B75E85E451F68BE9B66F7 /* PullUpController */; + targetProxy = F8C04CCB6BD040FDB99775BF786172D0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 41698083C7A3797BC8B6A26752DD851A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DCF8A9AF865D53B852B08F7253C08494 /* Pods-PullUpController_Example.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-PullUpController_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 5B72497DEE340A664F983CB2EF6ED00D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DE129AA35E6DD8D1AC44CED9A162F31F /* PullUpController.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/PullUpController/PullUpController-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PullUpController/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PullUpController/PullUpController.modulemap"; + PRODUCT_MODULE_NAME = PullUpController; + PRODUCT_NAME = PullUpController; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 74128B20A2ECF810A017E7EDD9B348C4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DE129AA35E6DD8D1AC44CED9A162F31F /* PullUpController.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/PullUpController/PullUpController-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PullUpController/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PullUpController/PullUpController.modulemap"; + PRODUCT_MODULE_NAME = PullUpController; + PRODUCT_NAME = PullUpController; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + B42B54097A876E8A982CBF5DAA91B1AB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + DE5E330B58FACE48D79870B93F2ACFF4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 21F144D6F2B3882BC5FD9933E31927EA /* Pods-PullUpController_Example.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-PullUpController_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 16FFB3C2338453E99B74D534984F78AF /* Build configuration list for PBXNativeTarget "PullUpController" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 74128B20A2ECF810A017E7EDD9B348C4 /* Debug */, + 5B72497DEE340A664F983CB2EF6ED00D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */, + B42B54097A876E8A982CBF5DAA91B1AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3271BBD358556CAFA956B27A0236CA70 /* Build configuration list for PBXNativeTarget "Pods-PullUpController_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 41698083C7A3797BC8B6A26752DD851A /* Debug */, + DE5E330B58FACE48D79870B93F2ACFF4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Info.plist b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + 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-PullUpController_Example/Pods-PullUpController_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-acknowledgements.markdown new file mode 100644 index 0000000..834e86a --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## PullUpController + +Copyright (c) 2018 MarioIannotta + +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 - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-acknowledgements.plist new file mode 100644 index 0000000..33c908f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-acknowledgements.plist @@ -0,0 +1,58 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2018 MarioIannotta <info@marioiannotta.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. + + License + MIT + Title + PullUpController + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-dummy.m b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-dummy.m new file mode 100644 index 0000000..5f861a8 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_PullUpController_Example : NSObject +@end +@implementation PodsDummy_Pods_PullUpController_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-frameworks.sh new file mode 100755 index 0000000..26f1d46 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-frameworks.sh @@ -0,0 +1,153 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +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="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --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 +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + 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}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${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 + STRIP_BINARY_RETVAL=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/PullUpController/PullUpController.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/PullUpController/PullUpController.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-resources.sh b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-resources.sh new file mode 100755 index 0000000..fe3f9c7 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-resources.sh @@ -0,0 +1,118 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +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" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_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 + # 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 != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" + fi +fi diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-umbrella.h new file mode 100644 index 0000000..b347ce4 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_PullUpController_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_PullUpController_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.debug.xcconfig new file mode 100644 index 0000000..e2f38ed --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PullUpController" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PullUpController/PullUpController.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "PullUpController" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.modulemap b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.modulemap new file mode 100644 index 0000000..91df9ac --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_PullUpController_Example { + umbrella header "Pods-PullUpController_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.release.xcconfig new file mode 100644 index 0000000..e2f38ed --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PullUpController" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PullUpController/PullUpController.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "PullUpController" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/PullUpController/Info.plist b/Example/Pods/Target Support Files/PullUpController/Info.plist new file mode 100644 index 0000000..0d7bfa2 --- /dev/null +++ b/Example/Pods/Target Support Files/PullUpController/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/PullUpController/PullUpController-dummy.m b/Example/Pods/Target Support Files/PullUpController/PullUpController-dummy.m new file mode 100644 index 0000000..0fecc86 --- /dev/null +++ b/Example/Pods/Target Support Files/PullUpController/PullUpController-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_PullUpController : NSObject +@end +@implementation PodsDummy_PullUpController +@end diff --git a/Example/Pods/Target Support Files/PullUpController/PullUpController-prefix.pch b/Example/Pods/Target Support Files/PullUpController/PullUpController-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/PullUpController/PullUpController-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/PullUpController/PullUpController-umbrella.h b/Example/Pods/Target Support Files/PullUpController/PullUpController-umbrella.h new file mode 100644 index 0000000..0ebd2b3 --- /dev/null +++ b/Example/Pods/Target Support Files/PullUpController/PullUpController-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double PullUpControllerVersionNumber; +FOUNDATION_EXPORT const unsigned char PullUpControllerVersionString[]; + diff --git a/Example/Pods/Target Support Files/PullUpController/PullUpController.modulemap b/Example/Pods/Target Support Files/PullUpController/PullUpController.modulemap new file mode 100644 index 0000000..d72c8bd --- /dev/null +++ b/Example/Pods/Target Support Files/PullUpController/PullUpController.modulemap @@ -0,0 +1,6 @@ +framework module PullUpController { + umbrella header "PullUpController-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/PullUpController/PullUpController.xcconfig b/Example/Pods/Target Support Files/PullUpController/PullUpController.xcconfig new file mode 100644 index 0000000..89cd387 --- /dev/null +++ b/Example/Pods/Target Support Files/PullUpController/PullUpController.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PullUpController +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_VERSION = 4.2 diff --git a/Example/PullUpController.xcodeproj/project.pbxproj b/Example/PullUpController.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3951a4c --- /dev/null +++ b/Example/PullUpController.xcodeproj/project.pbxproj @@ -0,0 +1,429 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; + AC44912120DBFFBE00F98838 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC44911920DBFFBE00F98838 /* LaunchScreen.storyboard */; }; + AC44912320DBFFBE00F98838 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC44911C20DBFFBE00F98838 /* SearchViewController.swift */; }; + AC44912420DBFFBE00F98838 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC44911D20DBFFBE00F98838 /* MapViewController.swift */; }; + AC44912520DBFFBE00F98838 /* SearchResultCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC44911E20DBFFBE00F98838 /* SearchResultCell.swift */; }; + AC44912620DBFFBE00F98838 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC44911F20DBFFBE00F98838 /* Main.storyboard */; }; + AC44912720DBFFBE00F98838 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AC44912020DBFFBE00F98838 /* Assets.xcassets */; }; + ACA1B1C52403BBB600B6A7B6 /* UIViewController+.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACA1B1C42403BBB600B6A7B6 /* UIViewController+.swift */; }; + E969182522AF18CFABF54185 /* Pods_PullUpController_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFA23D4840D57C4607249C0D /* Pods_PullUpController_Example.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 293D0A2418F9B613A61561F3 /* PullUpController.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PullUpController.podspec; path = ../PullUpController.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 56A8923EF4695AE64CB0A36A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 5F0B85693EE28EE7439643E7 /* Pods_PullUpController_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PullUpController_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD01AFB9204008FA782 /* PullUpController_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PullUpController_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 6D13751B90ADB8E6A7085A3F /* Pods-PullUpController_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PullUpController_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.release.xcconfig"; sourceTree = ""; }; + 94B8AB427B262E433795430A /* Pods-PullUpController_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PullUpController_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PullUpController_Tests/Pods-PullUpController_Tests.debug.xcconfig"; sourceTree = ""; }; + 9AB34C6007A366EB15327B6E /* Pods-PullUpController_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PullUpController_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example.debug.xcconfig"; sourceTree = ""; }; + AC44911920DBFFBE00F98838 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + AC44911A20DBFFBE00F98838 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AC44911C20DBFFBE00F98838 /* SearchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = ""; }; + AC44911D20DBFFBE00F98838 /* MapViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = ""; }; + AC44911E20DBFFBE00F98838 /* SearchResultCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchResultCell.swift; sourceTree = ""; }; + AC44911F20DBFFBE00F98838 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; + AC44912020DBFFBE00F98838 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + ACA1B1C42403BBB600B6A7B6 /* UIViewController+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+.swift"; sourceTree = ""; }; + BFA23D4840D57C4607249C0D /* Pods_PullUpController_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PullUpController_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F59F16287664980C2DF5643A /* Pods-PullUpController_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PullUpController_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PullUpController_Tests/Pods-PullUpController_Tests.release.xcconfig"; sourceTree = ""; }; + F97967A110801D095B7F4727 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 607FACCD1AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E969182522AF18CFABF54185 /* Pods_PullUpController_Example.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 607FACC71AFB9204008FA782 = { + isa = PBXGroup; + children = ( + 607FACF51AFB993E008FA782 /* Podspec Metadata */, + 607FACD21AFB9204008FA782 /* Example for PullUpController */, + 607FACD11AFB9204008FA782 /* Products */, + A34E4D9765C4E394C167B4D4 /* Pods */, + 6E774B959D15037B1657CE44 /* Frameworks */, + ); + sourceTree = ""; + }; + 607FACD11AFB9204008FA782 /* Products */ = { + isa = PBXGroup; + children = ( + 607FACD01AFB9204008FA782 /* PullUpController_Example.app */, + ); + name = Products; + sourceTree = ""; + }; + 607FACD21AFB9204008FA782 /* Example for PullUpController */ = { + isa = PBXGroup; + children = ( + 607FACD51AFB9204008FA782 /* AppDelegate.swift */, + AC44912020DBFFBE00F98838 /* Assets.xcassets */, + ACA1B1C32403BBAD00B6A7B6 /* Extensions */, + AC44911820DBFFBE00F98838 /* Supporting files */, + AC44911B20DBFFBE00F98838 /* UI */, + ); + name = "Example for PullUpController"; + path = PullUpController; + sourceTree = ""; + }; + 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { + isa = PBXGroup; + children = ( + 293D0A2418F9B613A61561F3 /* PullUpController.podspec */, + F97967A110801D095B7F4727 /* README.md */, + 56A8923EF4695AE64CB0A36A /* LICENSE */, + ); + name = "Podspec Metadata"; + sourceTree = ""; + }; + 6E774B959D15037B1657CE44 /* Frameworks */ = { + isa = PBXGroup; + children = ( + BFA23D4840D57C4607249C0D /* Pods_PullUpController_Example.framework */, + 5F0B85693EE28EE7439643E7 /* Pods_PullUpController_Tests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + A34E4D9765C4E394C167B4D4 /* Pods */ = { + isa = PBXGroup; + children = ( + 9AB34C6007A366EB15327B6E /* Pods-PullUpController_Example.debug.xcconfig */, + 6D13751B90ADB8E6A7085A3F /* Pods-PullUpController_Example.release.xcconfig */, + 94B8AB427B262E433795430A /* Pods-PullUpController_Tests.debug.xcconfig */, + F59F16287664980C2DF5643A /* Pods-PullUpController_Tests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + AC44911820DBFFBE00F98838 /* Supporting files */ = { + isa = PBXGroup; + children = ( + AC44911920DBFFBE00F98838 /* LaunchScreen.storyboard */, + AC44911A20DBFFBE00F98838 /* Info.plist */, + ); + path = "Supporting files"; + sourceTree = ""; + }; + AC44911B20DBFFBE00F98838 /* UI */ = { + isa = PBXGroup; + children = ( + AC44911F20DBFFBE00F98838 /* Main.storyboard */, + AC44911D20DBFFBE00F98838 /* MapViewController.swift */, + AC44911E20DBFFBE00F98838 /* SearchResultCell.swift */, + AC44911C20DBFFBE00F98838 /* SearchViewController.swift */, + ); + path = UI; + sourceTree = ""; + }; + ACA1B1C32403BBAD00B6A7B6 /* Extensions */ = { + isa = PBXGroup; + children = ( + ACA1B1C42403BBB600B6A7B6 /* UIViewController+.swift */, + ); + path = Extensions; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 607FACCF1AFB9204008FA782 /* PullUpController_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PullUpController_Example" */; + buildPhases = ( + 8909FE713AFF2BA76756295B /* [CP] Check Pods Manifest.lock */, + 607FACCC1AFB9204008FA782 /* Sources */, + 607FACCD1AFB9204008FA782 /* Frameworks */, + 607FACCE1AFB9204008FA782 /* Resources */, + 6426681623BA90E723285041 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PullUpController_Example; + productName = PullUpController; + productReference = 607FACD01AFB9204008FA782 /* PullUpController_Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 607FACC81AFB9204008FA782 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0830; + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = CocoaPods; + TargetAttributes = { + 607FACCF1AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = X9253HG4XT; + LastSwiftMigration = 1020; + }; + }; + }; + buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "PullUpController" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 607FACC71AFB9204008FA782; + productRefGroup = 607FACD11AFB9204008FA782 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 607FACCF1AFB9204008FA782 /* PullUpController_Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 607FACCE1AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC44912620DBFFBE00F98838 /* Main.storyboard in Resources */, + AC44912720DBFFBE00F98838 /* Assets.xcassets in Resources */, + AC44912120DBFFBE00F98838 /* LaunchScreen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 6426681623BA90E723285041 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/PullUpController/PullUpController.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PullUpController.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PullUpController_Example/Pods-PullUpController_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 8909FE713AFF2BA76756295B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-PullUpController_Example-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 607FACCC1AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC44912320DBFFBE00F98838 /* SearchViewController.swift in Sources */, + AC44912420DBFFBE00F98838 /* MapViewController.swift in Sources */, + ACA1B1C52403BBB600B6A7B6 /* UIViewController+.swift in Sources */, + AC44912520DBFFBE00F98838 /* SearchResultCell.swift in Sources */, + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 607FACED1AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + 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; + 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_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 607FACEE1AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 607FACF01AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9AB34C6007A366EB15327B6E /* Pods-PullUpController_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = X9253HG4XT; + INFOPLIST_FILE = "$(SRCROOT)/PullUpController/Supporting files/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = com.marioiannotta.test; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 607FACF11AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6D13751B90ADB8E6A7085A3F /* Pods-PullUpController_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = X9253HG4XT; + INFOPLIST_FILE = "$(SRCROOT)/PullUpController/Supporting files/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = com.marioiannotta.test; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "PullUpController" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACED1AFB9204008FA782 /* Debug */, + 607FACEE1AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PullUpController_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF01AFB9204008FA782 /* Debug */, + 607FACF11AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 607FACC81AFB9204008FA782 /* Project object */; +} diff --git a/PullUpControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/PullUpController.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 53% rename from PullUpControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Example/PullUpController.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 8dfc177..0ac21b6 100644 --- a/PullUpControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Example/PullUpController.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:PullUpController.xcodeproj"> diff --git a/Example/PullUpController.xcodeproj/xcshareddata/xcschemes/PullUpController-Example.xcscheme b/Example/PullUpController.xcodeproj/xcshareddata/xcschemes/PullUpController-Example.xcscheme new file mode 100644 index 0000000..b8494d3 --- /dev/null +++ b/Example/PullUpController.xcodeproj/xcshareddata/xcschemes/PullUpController-Example.xcscheme @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/PullUpController.xcworkspace/contents.xcworkspacedata b/Example/PullUpController.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..655019a --- /dev/null +++ b/Example/PullUpController.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/PullUpController.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/PullUpController.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/PullUpController.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/PullUpController.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Example/PullUpController.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..3ddf867 --- /dev/null +++ b/Example/PullUpController.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildSystemType + Latest + + diff --git a/PullUpControllerDemo/AppDelegate.swift b/Example/PullUpController/AppDelegate.swift similarity index 96% rename from PullUpControllerDemo/AppDelegate.swift rename to Example/PullUpController/AppDelegate.swift index b9e1941..ad0d7aa 100644 --- a/PullUpControllerDemo/AppDelegate.swift +++ b/Example/PullUpController/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/PullUpControllerDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/PullUpController/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from PullUpControllerDemo/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Example/PullUpController/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/PullUpControllerDemo/Assets.xcassets/Contents.json b/Example/PullUpController/Assets.xcassets/Contents.json similarity index 100% rename from PullUpControllerDemo/Assets.xcassets/Contents.json rename to Example/PullUpController/Assets.xcassets/Contents.json diff --git a/Example/PullUpController/Extensions/UIViewController+.swift b/Example/PullUpController/Extensions/UIViewController+.swift new file mode 100644 index 0000000..7662f09 --- /dev/null +++ b/Example/PullUpController/Extensions/UIViewController+.swift @@ -0,0 +1,22 @@ +// +// UIViewController+.swift +// PullUpController_Example +// +// Created by Mario on 24/02/2020. +// Copyright © 2020 CocoaPods. All rights reserved. +// + +import UIKit + +extension UIViewController { + + var hasSafeArea: Bool { + guard + #available(iOS 11.0, tvOS 11.0, *) + else { + return false + } + return UIApplication.shared.delegate?.window??.safeAreaInsets.top ?? 0 > 20 + } + +} diff --git a/PullUpControllerDemo/Info.plist b/Example/PullUpController/Supporting files/Info.plist similarity index 100% rename from PullUpControllerDemo/Info.plist rename to Example/PullUpController/Supporting files/Info.plist diff --git a/PullUpControllerDemo/Base.lproj/LaunchScreen.storyboard b/Example/PullUpController/Supporting files/LaunchScreen.storyboard similarity index 100% rename from PullUpControllerDemo/Base.lproj/LaunchScreen.storyboard rename to Example/PullUpController/Supporting files/LaunchScreen.storyboard diff --git a/PullUpControllerDemo/Base.lproj/Main.storyboard b/Example/PullUpController/UI/Main.storyboard similarity index 58% rename from PullUpControllerDemo/Base.lproj/Main.storyboard rename to Example/PullUpController/UI/Main.storyboard index fb72773..4cbefb0 100644 --- a/PullUpControllerDemo/Base.lproj/Main.storyboard +++ b/Example/PullUpController/UI/Main.storyboard @@ -1,19 +1,17 @@ - - - - + + - + - + - + @@ -21,6 +19,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -37,8 +116,10 @@ + + @@ -46,33 +127,50 @@ + + + + + + + + + + + + + + + + + - + - + - + - + - + @@ -102,33 +200,33 @@ - + - + - + - + - + - + - - - + - @@ -196,7 +291,25 @@ - + + + + + + + + + + + + + + + + + + + diff --git a/Example/PullUpController/UI/MapViewController.swift b/Example/PullUpController/UI/MapViewController.swift new file mode 100644 index 0000000..88f7136 --- /dev/null +++ b/Example/PullUpController/UI/MapViewController.swift @@ -0,0 +1,88 @@ +// +// MapViewController.swift +// PullUpControllerDemo +// +// Created by Mario on 03/11/2017. +// Copyright © 2017 Mario. All rights reserved. +// + +import UIKit +import MapKit + +class MapViewController: UIViewController { + + @IBOutlet private weak var mapView: MKMapView! + @IBOutlet private weak var sizeSliderView: UIView! { + didSet { + sizeSliderView.layer.cornerRadius = 10 + } + } + @IBOutlet private weak var widthSlider: UISlider! + @IBOutlet private weak var initialStateSegmentedControl: UISegmentedControl! + + private var originalPullUpControllerViewSize: CGSize = .zero + @IBOutlet weak var animateShowSwitch: UISwitch! + @IBOutlet weak var animateHideSwitch: UISwitch! + + private func makeSearchViewControllerIfNeeded() -> SearchViewController { + let currentPullUpController = children + .filter({ $0 is SearchViewController }) + .first as? SearchViewController + let pullUpController: SearchViewController = currentPullUpController ?? UIStoryboard(name: "Main",bundle: nil).instantiateViewController(withIdentifier: "SearchViewController") as! SearchViewController + if initialStateSegmentedControl.selectedSegmentIndex == 0 { + pullUpController.initialState = .contracted + } else { + pullUpController.initialState = .expanded + } + if originalPullUpControllerViewSize == .zero { + originalPullUpControllerViewSize = pullUpController.view.bounds.size + } + + return pullUpController + } + + override func viewDidLoad() { + super.viewDidLoad() + addPullUpController(animated: animateShowSwitch.isOn) + } + + private func addPullUpController(animated: Bool) { + let pullUpController = makeSearchViewControllerIfNeeded() + _ = pullUpController.view // call pullUpController.viewDidLoad() + addPullUpController(pullUpController, + initialStickyPointOffset: pullUpController.initialPointOffset, + animated: animated) + } + + func zoom(to location: CLLocationCoordinate2D) { + let span = MKCoordinateSpan(latitudeDelta: 0.05, longitudeDelta: 0.05) + let region = MKCoordinateRegion(center: location, span: span) + + mapView.setRegion(region, animated: true) + } + + @IBAction private func addButtonTapped() { + guard + children.filter({ $0 is SearchViewController }).count == 0 + else { return } + addPullUpController(animated: animateShowSwitch.isOn) + } + + @IBAction private func removeButtonTapped() { + let pullUpController = makeSearchViewControllerIfNeeded() + removePullUpController(pullUpController, animated: animateHideSwitch.isOn) + } + + @IBAction private func widthSliderValueChanged(_ sender: UISlider) { + let pullUpController = makeSearchViewControllerIfNeeded() + let width = originalPullUpControllerViewSize.width * CGFloat(sender.value) + pullUpController.portraitSize = CGSize(width: width, + height: pullUpController.portraitSize.height) + pullUpController.landscapeFrame = CGRect(origin: pullUpController.landscapeFrame.origin, + size: CGSize(width: width, + height: pullUpController.landscapeFrame.height)) + pullUpController.updatePreferredFrameIfNeeded(animated: true) + } + +} + diff --git a/PullUpControllerDemo/SearchResultCell.swift b/Example/PullUpController/UI/SearchResultCell.swift similarity index 100% rename from PullUpControllerDemo/SearchResultCell.swift rename to Example/PullUpController/UI/SearchResultCell.swift diff --git a/PullUpControllerDemo/SearchViewController.swift b/Example/PullUpController/UI/SearchViewController.swift similarity index 51% rename from PullUpControllerDemo/SearchViewController.swift rename to Example/PullUpController/UI/SearchViewController.swift index 76eb64b..24ad4ad 100644 --- a/PullUpControllerDemo/SearchViewController.swift +++ b/Example/PullUpController/UI/SearchViewController.swift @@ -8,9 +8,17 @@ import UIKit import MapKit +import PullUpController class SearchViewController: PullUpController { + enum InitialState { + case contracted + case expanded + } + + var initialState: InitialState = .contracted + // MARK: - IBOutlets @IBOutlet private weak var visualEffectView: UIVisualEffectView! @@ -23,24 +31,56 @@ class SearchViewController: PullUpController { @IBOutlet private weak var firstPreviewView: UIView! @IBOutlet private weak var secondPreviewView: UIView! @IBOutlet private weak var tableView: UITableView! + + var initialPointOffset: CGFloat { + switch initialState { + case .contracted: + return (searchBoxContainerView?.frame.height ?? 0) + safeAreaAdditionalOffset + case .expanded: + return pullUpControllerPreferredSize.height + } + } private var locations = [(title: String, location: CLLocationCoordinate2D)]() + public var portraitSize: CGSize = .zero + public var landscapeFrame: CGRect = .zero + + private var safeAreaAdditionalOffset: CGFloat { + hasSafeArea ? 20 : 0 + } + // MARK: - Lifecycle override func viewDidLoad() { super.viewDidLoad() + portraitSize = CGSize(width: min(UIScreen.main.bounds.width, UIScreen.main.bounds.height), + height: secondPreviewView.frame.maxY) + landscapeFrame = CGRect(x: 5, y: 50, width: 280, height: 300) + tableView.attach(to: self) setupDataSource() } - + override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() view.layer.cornerRadius = 12 } + override func pullUpControllerWillMove(to stickyPoint: CGFloat) { +// print("will move to \(stickyPoint)") + } + + override func pullUpControllerDidMove(to stickyPoint: CGFloat) { +// print("did move to \(stickyPoint)") + } + + override func pullUpControllerDidDrag(to point: CGFloat) { +// print("did drag to \(point)") + } + private func setupDataSource() { locations.append(("Rome", CLLocationCoordinate2D(latitude: 41.9004041, longitude: 12.4432921))) locations.append(("Milan", CLLocationCoordinate2D(latitude: 45.4625319, longitude: 9.1574741))) @@ -50,29 +90,61 @@ class SearchViewController: PullUpController { locations.append(("Amsterdam", CLLocationCoordinate2D(latitude: 52.354775, longitude: 4.7585401))) locations.append(("Dublin", CLLocationCoordinate2D(latitude: 53.3244431, longitude: -6.3857869))) locations.append(("Reykjavik", CLLocationCoordinate2D(latitude: 64.1335484, longitude: -21.9224815))) + locations.append(("London", CLLocationCoordinate2D(latitude: 51.5287718, longitude: -0.2416817))) + locations.append(("Paris", CLLocationCoordinate2D(latitude: 48.8589507, longitude: 2.2770201))) + locations.append(("Amsterdam", CLLocationCoordinate2D(latitude: 52.354775, longitude: 4.7585401))) + locations.append(("Dublin", CLLocationCoordinate2D(latitude: 53.3244431, longitude: -6.3857869))) + locations.append(("Reykjavik", CLLocationCoordinate2D(latitude: 64.1335484, longitude: -21.9224815))) + locations.append(("London", CLLocationCoordinate2D(latitude: 51.5287718, longitude: -0.2416817))) + locations.append(("Paris", CLLocationCoordinate2D(latitude: 48.8589507, longitude: 2.2770201))) + locations.append(("Amsterdam", CLLocationCoordinate2D(latitude: 52.354775, longitude: 4.7585401))) + locations.append(("Dublin", CLLocationCoordinate2D(latitude: 53.3244431, longitude: -6.3857869))) + locations.append(("Reykjavik", CLLocationCoordinate2D(latitude: 64.1335484, longitude: -21.9224815))) } // MARK: - PullUpController override var pullUpControllerPreferredSize: CGSize { - return CGSize(width: UIScreen.main.bounds.width, height: secondPreviewView.frame.maxY) + return portraitSize } - override var pullUpControllerPreviewOffset: CGFloat { - return searchBoxContainerView.frame.height + override var pullUpControllerPreferredLandscapeFrame: CGRect { + return landscapeFrame } override var pullUpControllerMiddleStickyPoints: [CGFloat] { - return [firstPreviewView.frame.maxY] + switch initialState { + case .contracted: + return [firstPreviewView.frame.maxY] + case .expanded: + return [searchBoxContainerView.frame.maxY + safeAreaAdditionalOffset, firstPreviewView.frame.maxY] + } } - override var pullUpControllerIsBouncingEnabled: Bool { - return false + override var pullUpControllerBounceOffset: CGFloat { + return 20 } - override var pullUpControllerPreferredLandscapeFrame: CGRect { - return CGRect(x: 5, y: 5, width: 280, height: UIScreen.main.bounds.height - 10) + override func pullUpControllerAnimate(action: PullUpController.Action, + withDuration duration: TimeInterval, + animations: @escaping () -> Void, + completion: ((Bool) -> Void)?) { + switch action { + case .move: + UIView.animate(withDuration: 0.3, + delay: 0, + usingSpringWithDamping: 0.7, + initialSpringVelocity: 0, + options: .curveEaseInOut, + animations: animations, + completion: completion) + default: + UIView.animate(withDuration: 0.3, + animations: animations, + completion: completion) + } } + } // MARK: - UISearchBarDelegate @@ -81,7 +153,7 @@ extension SearchViewController: UISearchBarDelegate { func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) { if let lastStickyPoint = pullUpControllerAllStickyPoints.last { - pullUpControllerMoveToVisiblePoint(lastStickyPoint, completion: nil) + pullUpControllerMoveToVisiblePoint(lastStickyPoint, animated: true, completion: nil) } } @@ -113,7 +185,7 @@ extension SearchViewController: UITableViewDataSource, UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) view.endEditing(true) - pullUpControllerMoveToVisiblePoint(pullUpControllerMiddleStickyPoints[0], completion: nil) + pullUpControllerMoveToVisiblePoint(pullUpControllerMiddleStickyPoints[0], animated: true, completion: nil) (parent as? MapViewController)?.zoom(to: locations[indexPath.row].location) } diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..1d6591c --- /dev/null +++ b/Package.swift @@ -0,0 +1,20 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PullUpController", + platforms: [.iOS(.v9)], + products: [ + .library( + name: "PullUpController", + targets: ["PullUpController"] + ) + ], + targets: [ + .target( + name: "PullUpController", + path: "PullUpController" + ) + ] +) diff --git a/PullUpController.podspec b/PullUpController.podspec index bbdf54e..1857235 100644 --- a/PullUpController.podspec +++ b/PullUpController.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'PullUpController' - s.version = '0.1.0' + s.version = '0.8.0' s.summary = 'Pull up controller with multiple sticky points like in iOS Maps.' s.homepage = 'https://github.com/MarioIannotta/PullUpController' s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { 'Mario Iannotta' => 'info@marioiannotta.com' } s.source = { :git => 'https://github.com/MarioIannotta/PullUpController.git', :tag => s.version.to_s } s.ios.deployment_target = '9.0' - s.source_files = 'PullUpController/*.swift' - s.pod_target_xcconfig = { "SWIFT_VERSION" => "4.0" } + s.source_files = 'PullUpController/**/*.swift' + s.swift_version = '5' end diff --git a/PullUpController/PullUpController.swift b/PullUpController/PullUpController.swift old mode 100644 new mode 100755 index c23e78a..f23e06e --- a/PullUpController/PullUpController.swift +++ b/PullUpController/PullUpController.swift @@ -10,20 +10,23 @@ import UIKit open class PullUpController: UIViewController { - private var leftConstraint: NSLayoutConstraint? - private var topConstraint: NSLayoutConstraint? - private var widthConstraint: NSLayoutConstraint? - private var heightConstraint: NSLayoutConstraint? - private var panGestureRecognizer: UIPanGestureRecognizer? - - /** - The desired height in screen units expressed in the pull up controller coordinate system that will be initially showed. - The default value is 50. - */ - open var pullUpControllerPreviewOffset: CGFloat { - return 50 + public enum Action { + /** + The action used when the pull up controller's view is added to its parent view + */ + case add + /** + The action used when the pull up controller's view is removed to its parent view + */ + case remove + /** + The action used when the pull up controller's view position change + */ + case move } + // MARK: - Open properties + /** The desired size of the pull up controller’s view, in screen units. The default value is width: UIScreen.main.bounds.width, height: 400. @@ -32,6 +35,14 @@ open class PullUpController: UIViewController { return CGSize(width: UIScreen.main.bounds.width, height: 400) } + /** + The desired size of the pull up controller’s view, in screen units when the device is in landscape mode. + The default value is (x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20). + */ + open var pullUpControllerPreferredLandscapeFrame: CGRect { + return CGRect(x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20) + } + /** A list of y values, in screen units expressed in the pull up controller coordinate system. At the end of the gestures the pull up controller will scroll to the nearest point in the list. @@ -46,64 +57,160 @@ open class PullUpController: UIViewController { } /** - A list of y values, in screen units expressed in the pull up controller coordinate system. - At the end of the gesture the pull up controller will scroll at the nearest point in the list. + A CGFloat value that determines how much the pull up controller's view can bounce outside it's size. + The default value is 0 and that means the the view cannot expand beyond its size. */ - public final var pullUpControllerAllStickyPoints: [CGFloat] { - var sc_allStickyPoints = [pullUpControllerPreviewOffset, pullUpControllerPreferredSize.height] - sc_allStickyPoints.append(contentsOf: pullUpControllerMiddleStickyPoints) - return sc_allStickyPoints.sorted() + open var pullUpControllerBounceOffset: CGFloat { + return 0 } /** - A Boolean value that determines whether bouncing occurs when scrolling reaches the end of the pull up controller's view size. - The default value is false. + A CGFloat value that represent the current point, expressed in the pull up controller coordinate system, + where the pull up controller's view is positioned. */ - open var pullUpControllerIsBouncingEnabled: Bool { - return false + open var pullUpControllerCurrentPointOffset: CGFloat { + guard + let parentViewHeight = parent?.view.frame.height + else { return 0 } + return parentViewHeight - (topConstraint?.constant ?? 0) } /** - The desired size of the pull up controller’s view, in screen units when the device is in landscape mode. - The default value is (x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20). + A CGFloat value that represent the vertical velocity threshold (expressed in points/sec) beyond wich + the target sticky point is skippend and the view is positioned to the next one. + */ + open var pullUpControllerSkipPointVerticalVelocityThreshold: CGFloat { + return 700 + } + + // MARK: - Public properties + + /** + A list of y values, in screen units expressed in the pull up controller coordinate system. + At the end of the gesture the pull up controller will scroll at the nearest point in the list. */ - open var pullUpControllerPreferredLandscapeFrame: CGRect { - return CGRect(x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20) + public final var pullUpControllerAllStickyPoints: [CGFloat] { + var sc_allStickyPoints = [initialStickyPointOffset, pullUpControllerPreferredSize.height].compactMap { $0 } + sc_allStickyPoints.append(contentsOf: pullUpControllerMiddleStickyPoints) + return sc_allStickyPoints.sorted() } + private var leftConstraint: NSLayoutConstraint? + private var topConstraint: NSLayoutConstraint? + private var bottomConstraint: NSLayoutConstraint? + private var widthConstraint: NSLayoutConstraint? + private var heightConstraint: NSLayoutConstraint? + private var panGestureRecognizer: UIPanGestureRecognizer? + private var isPortrait: Bool { return UIScreen.main.bounds.height > UIScreen.main.bounds.width } private var portraitPreviousStickyPointIndex: Int? + fileprivate weak var internalScrollView: UIScrollView? + + private var initialInternalScrollViewContentOffset: CGPoint = .zero + private var initialStickyPointOffset: CGFloat? + private var currentStickyPointIndex: Int { + let stickyPointTreshold = (self.parent?.view.frame.height ?? 0) - (topConstraint?.constant ?? 0) + let stickyPointsLessCurrentPosition = pullUpControllerAllStickyPoints.map { abs($0 - stickyPointTreshold) } + guard let minStickyPointDifference = stickyPointsLessCurrentPosition.min() else { return 0 } + return stickyPointsLessCurrentPosition.firstIndex(of: minStickyPointDifference) ?? 0 + } + + // MARK: - Open methods + + /** + This method is called before the pull up controller's view move to a point. + The default implementation of this method does nothing. + - parameter point: The target point, expressed in the pull up controller coordinate system + */ + open func pullUpControllerWillMove(to point: CGFloat) { } + + /** + This method is called after the pull up controller's view move to a point. + The default implementation of this method does nothing. + - parameter point: The target point, expressed in the pull up controller coordinate system + */ + open func pullUpControllerDidMove(to point: CGFloat) { } + + /** + This method is called after the pull up controller's view is dragged to a point. + The default implementation of this method does nothing. + - parameter stickyPoint: The target point, expressed in the pull up controller coordinate system + */ + open func pullUpControllerDidDrag(to point: CGFloat) { } + /** This method will move the pull up controller's view in order to show the provided visible point. You may use on of `pullUpControllerAllStickyPoints` item to provide a valid visible point. - parameter visiblePoint: the y value to make visible, in screen units expressed in the pull up controller coordinate system. + - parameter animated: Pass true to animate the move; otherwise, pass false. - parameter completion: The closure to execute after the animation is completed. This block has no return value and takes no parameters. You may specify nil for this parameter. */ - open func pullUpControllerMoveToVisiblePoint(_ visiblePoint: CGFloat, completion: (() -> Void)?) { - guard isPortrait else { return } - topConstraint?.constant = (parent?.view.frame.height ?? 0) - visiblePoint - - UIView.animate( - withDuration: 0.3, + open func pullUpControllerMoveToVisiblePoint(_ visiblePoint: CGFloat, animated: Bool, completion: (() -> Void)?) { + guard + isPortrait, + let parentViewHeight = parent?.view.frame.height + else { return } + topConstraint?.constant = parentViewHeight - visiblePoint + pullUpControllerWillMove(to: visiblePoint) + pullUpControllerAnimate( + action: .move, + withDuration: animated ? 0.3 : 0, animations: { [weak self] in self?.parent?.view?.layoutIfNeeded() }, - completion: { _ in + completion: { [weak self] _ in + self?.pullUpControllerDidMove(to: visiblePoint) completion?() - } - ) + }) + } + + /** + This method update the pull up controller's view size according to `pullUpControllerPreferredSize` and `pullUpControllerPreferredLandscapeFrame`. + If the device is in portrait, the pull up controller's view will be attached to the nearest sticky point after the resize. + - parameter animated: Pass true to animate the resize; otherwise, pass false. + */ + open func updatePreferredFrameIfNeeded(animated: Bool) { + guard + let parentView = parent?.view + else { return } + refreshConstraints(newSize: parentView.frame.size, + customTopOffset: parentView.frame.size.height - (pullUpControllerAllStickyPoints.first ?? 0)) + + pullUpControllerAnimate( + action: .move, + withDuration: animated ? 0.3 : 0, + animations: { [weak self] in + self?.view.layoutIfNeeded() + }, + completion: nil) + } + + /** + This method will be called when an animation needs to be performed. + You can consider override this method and customize the animation using the method + `UIView.animate(withDuration:, delay:, usingSpringWithDamping:, initialSpringVelocity:, options:, animations:, completion:)` + - parameter action: The action that is about to be performed, see `PullUpController.Action` for more info + - parameter duration: The total duration of the animations, measured in seconds. If you specify a negative value or 0, the changes are made without animating them. + - parameter animations: A block object containing the changes to commit to the views. + - parameter completion: A block object to be executed when the animation sequence ends. + */ + open func pullUpControllerAnimate(action: Action, + withDuration duration: TimeInterval, + animations: @escaping () -> Void, + completion: ((Bool) -> Void)?) { + UIView.animate(withDuration: duration, animations: animations, completion: completion) } open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { - let isPortrait = size.height > size.width + let isNewSizePortrait = size.height > size.width var targetStickyPoint: CGFloat? - if !isPortrait { + if !isNewSizePortrait { portraitPreviousStickyPointIndex = currentStickyPointIndex } else if let portraitPreviousStickyPointIndex = portraitPreviousStickyPointIndex, @@ -114,14 +221,39 @@ open class PullUpController: UIViewController { } coordinator.animate(alongsideTransition: { [weak self] coordinator in - self?.refreshConstraints(size: size) + self?.refreshConstraints(newSize: size) if let targetStickyPoint = targetStickyPoint { - self?.pullUpControllerMoveToVisiblePoint(targetStickyPoint, completion: nil) + self?.pullUpControllerMoveToVisiblePoint(targetStickyPoint, animated: true, completion: nil) } }) } - fileprivate func setupPanGestureRecognizer() { + // MARK: - Setup + + fileprivate func setup(superview: UIView, initialStickyPointOffset: CGFloat) { + self.initialStickyPointOffset = initialStickyPointOffset + view.translatesAutoresizingMaskIntoConstraints = false + superview.addSubview(view) + view.frame = CGRect(origin: CGPoint(x: view.frame.origin.x, + y: superview.bounds.height), + size: view.frame.size) + + setupPanGestureRecognizer() + setupConstraints() + refreshConstraints(newSize: superview.frame.size, + customTopOffset: superview.frame.height - initialStickyPointOffset) + } + + fileprivate func addInternalScrollViewPanGesture() { + internalScrollView?.panGestureRecognizer.addTarget(self, action: #selector(handleScrollViewGestureRecognizer(_:))) + } + + fileprivate func removeInternalScrollViewPanGestureRecognizer() { + internalScrollView?.panGestureRecognizer.removeTarget(self, action: #selector(handleScrollViewGestureRecognizer(_:))) + } + + private func setupPanGestureRecognizer() { + addInternalScrollViewPanGesture() panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(handlePanGestureRecognizer(_:))) panGestureRecognizer?.minimumNumberOfTouches = 1 panGestureRecognizer?.maximumNumberOfTouches = 1 @@ -130,27 +262,37 @@ open class PullUpController: UIViewController { } } - fileprivate func setupConstrains() { - guard let parentView = parent?.view else { return } + private func setupConstraints() { + guard + let parentView = parent?.view + else { return } - topConstraint = view.topAnchor.constraint(equalTo: parentView.topAnchor, constant: 0) - leftConstraint = view.leftAnchor.constraint(equalTo: parentView.leftAnchor, constant: 0) + topConstraint = view.topAnchor.constraint(equalTo: parentView.topAnchor) + leftConstraint = view.leftAnchor.constraint(equalTo: parentView.leftAnchor) widthConstraint = view.widthAnchor.constraint(equalToConstant: pullUpControllerPreferredSize.width) heightConstraint = view.heightAnchor.constraint(equalToConstant: pullUpControllerPreferredSize.height) + heightConstraint?.priority = .defaultLow + bottomConstraint = parentView.bottomAnchor.constraint(equalTo: view.bottomAnchor) - NSLayoutConstraint.activate([topConstraint, leftConstraint, widthConstraint, heightConstraint].flatMap { $0 }) + let constraintsToActivate = [topConstraint, + leftConstraint, + widthConstraint, + heightConstraint, + bottomConstraint].compactMap { $0 } + NSLayoutConstraint.activate(constraintsToActivate) } - private var currentStickyPointIndex: Int { - let stickyPointTreshold = (self.parent?.view.frame.height ?? 0) - (topConstraint?.constant ?? 0) - let stickyPointsLessCurrentPosition = pullUpControllerAllStickyPoints.map { abs($0 - stickyPointTreshold) } - guard let minStickyPointDifference = stickyPointsLessCurrentPosition.min() else { return 0 } - return stickyPointsLessCurrentPosition.index(of: minStickyPointDifference) ?? 0 + private func refreshConstraints(newSize: CGSize, customTopOffset: CGFloat? = nil) { + if newSize.height > newSize.width { + setPortraitConstraints(parentViewSize: newSize, customTopOffset: customTopOffset) + } else { + setLandscapeConstraints() + } } private func nearestStickyPointY(yVelocity: CGFloat) -> CGFloat { var currentStickyPointIndex = self.currentStickyPointIndex - if abs(yVelocity) > 700 { // 1000 points/sec = "fast" scroll + if abs(yVelocity) > pullUpControllerSkipPointVerticalVelocityThreshold { if yVelocity > 0 { currentStickyPointIndex = max(currentStickyPointIndex - 1, 0) } else { @@ -161,83 +303,169 @@ open class PullUpController: UIViewController { return (parent?.view.frame.height ?? 0) - pullUpControllerAllStickyPoints[currentStickyPointIndex] } - @objc private func handlePanGestureRecognizer(_ gestureRecognizer: UIPanGestureRecognizer) { + @objc private func handleScrollViewGestureRecognizer(_ gestureRecognizer: UIPanGestureRecognizer) { guard isPortrait, + let scrollView = internalScrollView, let topConstraint = topConstraint, - let parentViewHeight = parent?.view.frame.height + let lastStickyPoint = pullUpControllerAllStickyPoints.last, + let parentViewHeight = parent?.view.bounds.height else { return } - let yTranslation = gestureRecognizer.translation(in: view).y - gestureRecognizer.setTranslation(.zero, in: view) + let isFullOpened = topConstraint.constant <= parentViewHeight - lastStickyPoint + let yTranslation = gestureRecognizer.translation(in: scrollView).y + let isScrollingDown = gestureRecognizer.velocity(in: scrollView).y > 0 + + /** + The user should be able to drag the view down through the internal scroll view when + - the scroll direction is down (`isScrollingDown`) + - the internal scroll view is scrolled to the top (`scrollView.contentOffset.y <= 0`) + */ + let shouldDragViewDown = isScrollingDown && scrollView.contentOffset.y <= 0 - topConstraint.constant += yTranslation + /** + The user should be able to drag the view up through the internal scroll view when + - the scroll direction is up (`!isScrollingDown`) + - the PullUpController's view is fully opened. (`topConstraint.constant <= parentViewHeight - lastStickyPoint`) + */ + let shouldDragViewUp = !isScrollingDown && !isFullOpened + let shouldDragView = shouldDragViewDown || shouldDragViewUp - if !pullUpControllerIsBouncingEnabled { - topConstraint.constant = max(topConstraint.constant, parentViewHeight - pullUpControllerPreferredSize.height) - topConstraint.constant = min(topConstraint.constant, parentViewHeight - pullUpControllerPreviewOffset) + if shouldDragView { + scrollView.bounces = false + scrollView.setContentOffset(.zero, animated: false) } - if gestureRecognizer.state == .ended { - topConstraint.constant = nearestStickyPointY(yVelocity: gestureRecognizer.velocity(in: view).y) - UIView.animate( - withDuration: 0.3, - animations: { [weak self] in - self?.parent?.view.layoutIfNeeded() - } - ) + switch gestureRecognizer.state { + case .began: + initialInternalScrollViewContentOffset = scrollView.contentOffset + + case .changed: + guard + shouldDragView + else { break } + setTopOffset(topConstraint.constant + yTranslation - initialInternalScrollViewContentOffset.y) + gestureRecognizer.setTranslation(initialInternalScrollViewContentOffset, in: scrollView) + + case .ended: + scrollView.bounces = true + goToNearestStickyPoint(verticalVelocity: gestureRecognizer.velocity(in: view).y) + + default: + break } + } - @objc fileprivate func handleInternalScrollViewPanGestureRecognizer(_ gestureRecognizer: UIPanGestureRecognizer) { + @objc private func handlePanGestureRecognizer(_ gestureRecognizer: UIPanGestureRecognizer) { guard isPortrait, - let scrollView = gestureRecognizer.view as? UIScrollView, - let lastStickyPoint = pullUpControllerAllStickyPoints.last, - let parentViewHeight = parent?.view.frame.height, - let topConstraintValue = topConstraint?.constant + let topConstraint = topConstraint else { return } - let isScrollingDown = gestureRecognizer.translation(in: view).y > 0 - let shouldScrollingDownTriggerGestureRecognizer = isScrollingDown && scrollView.contentOffset.y <= 0 - let shouldScrollingUpTriggerGestureRecognizer = !isScrollingDown && topConstraintValue != parentViewHeight - lastStickyPoint + let yTranslation = gestureRecognizer.translation(in: view).y - if shouldScrollingDownTriggerGestureRecognizer || shouldScrollingUpTriggerGestureRecognizer { - handlePanGestureRecognizer(gestureRecognizer) + switch gestureRecognizer.state { + case .changed: + setTopOffset(topConstraint.constant + yTranslation, allowBounce: true) + gestureRecognizer.setTranslation(.zero, in: view) + + case .ended: + goToNearestStickyPoint(verticalVelocity: gestureRecognizer.velocity(in: view).y) + + default: + break } - - if gestureRecognizer.state.rawValue == 3 { // for some reason gestureRecognizer.state == .ended doesn't work - topConstraint?.constant = nearestStickyPointY(yVelocity: 0) - UIView.animate( - withDuration: 0.3, - animations: { [weak self] in - self?.parent?.view.layoutIfNeeded() + } + + private func goToNearestStickyPoint(verticalVelocity: CGFloat) { + guard + isPortrait, + let topConstraint = topConstraint + else { return } + let targetTopOffset = nearestStickyPointY(yVelocity: verticalVelocity) // v = px/s + let distanceToConver = topConstraint.constant - targetTopOffset // px + let animationDuration = max(0.08, min(0.3, TimeInterval(abs(distanceToConver/verticalVelocity)))) // s = px/v + setTopOffset(targetTopOffset, animationDuration: animationDuration) + } + + private func setTopOffset(_ value: CGFloat, + animationDuration: TimeInterval? = nil, + allowBounce: Bool = false) { + guard + let parentViewHeight = parent?.view.frame.height + else { return } + // Apply right value bounding for the provided bounce offset if needed + let value: CGFloat = { + guard + let firstStickyPoint = pullUpControllerAllStickyPoints.first, + let lastStickyPoint = pullUpControllerAllStickyPoints.last + else { + return value } - ) + let bounceOffset = allowBounce ? pullUpControllerBounceOffset : 0 + let minValue = parentViewHeight - lastStickyPoint - bounceOffset + let maxValue = parentViewHeight - firstStickyPoint + bounceOffset + return max(min(value, maxValue), minValue) + }() + let targetPoint = parentViewHeight - value + /* + `willMoveToStickyPoint` and `didMoveToStickyPoint` should be + called only if the user has ended the gesture + */ + let shouldNotifyObserver = animationDuration != nil + topConstraint?.constant = value + pullUpControllerDidDrag(to: targetPoint) + if shouldNotifyObserver { + pullUpControllerWillMove(to: targetPoint) } + pullUpControllerAnimate( + action: .move, + withDuration: animationDuration ?? 0, + animations: { [weak self] in + self?.parent?.view.layoutIfNeeded() + }, + completion: { [weak self] _ in + if shouldNotifyObserver { + self?.pullUpControllerDidMove(to: targetPoint) + } + } + ) } - private func setPortraitConstraints(parentViewSize: CGSize) { - topConstraint?.constant = parentViewSize.height - pullUpControllerPreviewOffset + private func setPortraitConstraints(parentViewSize: CGSize, customTopOffset: CGFloat? = nil) { + if let customTopOffset = customTopOffset { + topConstraint?.constant = customTopOffset + } else { + topConstraint?.constant = nearestStickyPointY(yVelocity: 0) + } leftConstraint?.constant = (parentViewSize.width - min(pullUpControllerPreferredSize.width, parentViewSize.width))/2 widthConstraint?.constant = pullUpControllerPreferredSize.width heightConstraint?.constant = pullUpControllerPreferredSize.height + heightConstraint?.priority = .defaultLow + bottomConstraint?.constant = 0 } private func setLandscapeConstraints() { - topConstraint?.constant = pullUpControllerPreferredLandscapeFrame.origin.y - leftConstraint?.constant = pullUpControllerPreferredLandscapeFrame.origin.x - widthConstraint?.constant = pullUpControllerPreferredLandscapeFrame.width - heightConstraint?.constant = pullUpControllerPreferredLandscapeFrame.height + guard + let parentViewHeight = parent?.view.frame.height + else { return } + let landscapeFrame = pullUpControllerPreferredLandscapeFrame + topConstraint?.constant = landscapeFrame.origin.y + leftConstraint?.constant = landscapeFrame.origin.x + widthConstraint?.constant = landscapeFrame.width + heightConstraint?.constant = landscapeFrame.height + heightConstraint?.priority = .defaultHigh + bottomConstraint?.constant = parentViewHeight - landscapeFrame.height - landscapeFrame.origin.y } - fileprivate func refreshConstraints(size: CGSize) { - if size.width > size.height { - setLandscapeConstraints() - } else { - setPortraitConstraints(parentViewSize: size) - } + fileprivate func hide() { + guard + let parentViewHeight = parent?.view.frame.height + else { return } + topConstraint?.constant = parentViewHeight } + } extension UIViewController { @@ -245,17 +473,70 @@ extension UIViewController { /** Adds the specified pull up view controller as a child of the current view controller. - parameter pullUpController: the pull up controller to add as a child of the current view controller. + - parameter initialStickyPointOffset: The point where the provided `pullUpController`'s view will be initially placed expressed in screen units of the pull up controller coordinate system. If this value is not provided, the `pullUpController`'s view will be initially placed expressed + - parameter animated: Pass true to animate the adding; otherwise, pass false. + - parameter completion: Optional completion handler to be called after the PullUpController is added. */ - open func addPullUpController(_ pullUpController: PullUpController) { - addChildViewController(pullUpController) - - pullUpController.view.translatesAutoresizingMaskIntoConstraints = false - view.addSubview(pullUpController.view) - - pullUpController.setupPanGestureRecognizer() - pullUpController.setupConstrains() - pullUpController.refreshConstraints(size: view.frame.size) + open func addPullUpController(_ pullUpController: PullUpController, + initialStickyPointOffset: CGFloat, + animated: Bool, + completion: ((Bool) -> Void)? = nil) { + if (self is UITableViewController) { + print("⚠️ Attaching a `PullUpController` to a `UITableViewController` is discouraged. Check this issue for more information: https://github.com/MarioIannotta/PullUpController/issues/14") + } + addChild(pullUpController) + pullUpController.setup(superview: view, initialStickyPointOffset: initialStickyPointOffset) + if animated { + pullUpController.pullUpControllerAnimate( + action: .add, + withDuration: 0.3, + animations: { [weak self] in + self?.view.layoutIfNeeded() + }, + completion: { didComplete in + pullUpController.didMove(toParent: self) + completion?(didComplete) + } + ) + } else { + view.layoutIfNeeded() + pullUpController.didMove(toParent: self) + completion?(true) + } + } + + /** + Adds the specified pull up view controller as a child of the current view controller. + - parameter pullUpController: the pull up controller to remove as a child from the current view controller. + - parameter animated: Pass true to animate the removing; otherwise, pass false. + - parameter completion: Optional completion handler to be called after the PullUpController is removed. + */ + open func removePullUpController(_ pullUpController: PullUpController, + animated: Bool, + completion: ((Bool) -> Void)? = nil) { + pullUpController.hide() + if animated { + pullUpController.pullUpControllerAnimate( + action: .remove, + withDuration: 0.3, + animations: { [weak self] in + self?.view.layoutIfNeeded() + }, + completion: { didComplete in + pullUpController.willMove(toParent: nil) + pullUpController.view.removeFromSuperview() + pullUpController.removeFromParent() + completion?(didComplete) + }) + } else { + view.layoutIfNeeded() + pullUpController.willMove(toParent: nil) + pullUpController.view.removeFromSuperview() + pullUpController.removeFromParent() + completion?(true) + } } + } extension UIScrollView { @@ -265,6 +546,18 @@ extension UIScrollView { - parameter pullUpController: the pull up controller to move with the current scroll view content. */ open func attach(to pullUpController: PullUpController) { - panGestureRecognizer.addTarget(pullUpController, action: #selector(pullUpController.handleInternalScrollViewPanGestureRecognizer(_:))) + pullUpController.internalScrollView?.detach(from: pullUpController) + pullUpController.internalScrollView = self + pullUpController.addInternalScrollViewPanGesture() } + + /** + Remove the scroll view from the pull up controller so it no longer moves with the scroll view content. + - parameter pullUpController: the pull up controller to be removed from controlling the scroll view. + */ + open func detach(from pullUpController: PullUpController) { + pullUpController.removeInternalScrollViewPanGestureRecognizer() + pullUpController.internalScrollView = nil + } + } diff --git a/PullUpControllerDemo.xcodeproj/project.pbxproj b/PullUpControllerDemo.xcodeproj/project.pbxproj deleted file mode 100644 index 6e21ed5..0000000 --- a/PullUpControllerDemo.xcodeproj/project.pbxproj +++ /dev/null @@ -1,345 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - AC1A74C81FACEEAE00392CB8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC1A74C71FACEEAE00392CB8 /* AppDelegate.swift */; }; - AC1A74CA1FACEEAE00392CB8 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC1A74C91FACEEAE00392CB8 /* MapViewController.swift */; }; - AC1A74CD1FACEEAE00392CB8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC1A74CB1FACEEAE00392CB8 /* Main.storyboard */; }; - AC1A74CF1FACEEAE00392CB8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AC1A74CE1FACEEAE00392CB8 /* Assets.xcassets */; }; - AC1A74D21FACEEAE00392CB8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AC1A74D01FACEEAE00392CB8 /* LaunchScreen.storyboard */; }; - AC1A74DB1FACEED700392CB8 /* PullUpController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC1A74DA1FACEED700392CB8 /* PullUpController.swift */; }; - AC1A74DD1FACF09000392CB8 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC1A74DC1FACF09000392CB8 /* SearchViewController.swift */; }; - ACE403581FADF1C500898D01 /* SearchResultCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACE403571FADF1C500898D01 /* SearchResultCell.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - AC1A74C41FACEEAD00392CB8 /* PullUpControllerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PullUpControllerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - AC1A74C71FACEEAE00392CB8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - AC1A74C91FACEEAE00392CB8 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = ""; }; - AC1A74CC1FACEEAE00392CB8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - AC1A74CE1FACEEAE00392CB8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - AC1A74D11FACEEAE00392CB8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - AC1A74D31FACEEAE00392CB8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AC1A74DA1FACEED700392CB8 /* PullUpController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PullUpController.swift; sourceTree = ""; }; - AC1A74DC1FACF09000392CB8 /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = ""; }; - ACE403571FADF1C500898D01 /* SearchResultCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultCell.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - AC1A74C11FACEEAD00392CB8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - AC1A74BB1FACEEAD00392CB8 = { - isa = PBXGroup; - children = ( - AC1A74D91FACEECD00392CB8 /* PullUpController */, - AC1A74C61FACEEAD00392CB8 /* PullUpControllerDemo */, - AC1A74C51FACEEAD00392CB8 /* Products */, - ); - sourceTree = ""; - }; - AC1A74C51FACEEAD00392CB8 /* Products */ = { - isa = PBXGroup; - children = ( - AC1A74C41FACEEAD00392CB8 /* PullUpControllerDemo.app */, - ); - name = Products; - sourceTree = ""; - }; - AC1A74C61FACEEAD00392CB8 /* PullUpControllerDemo */ = { - isa = PBXGroup; - children = ( - AC1A74D31FACEEAE00392CB8 /* Info.plist */, - AC1A74C71FACEEAE00392CB8 /* AppDelegate.swift */, - AC1A74C91FACEEAE00392CB8 /* MapViewController.swift */, - AC1A74DC1FACF09000392CB8 /* SearchViewController.swift */, - ACE403571FADF1C500898D01 /* SearchResultCell.swift */, - AC1A74CE1FACEEAE00392CB8 /* Assets.xcassets */, - AC1A74D01FACEEAE00392CB8 /* LaunchScreen.storyboard */, - AC1A74CB1FACEEAE00392CB8 /* Main.storyboard */, - ); - path = PullUpControllerDemo; - sourceTree = ""; - }; - AC1A74D91FACEECD00392CB8 /* PullUpController */ = { - isa = PBXGroup; - children = ( - AC1A74DA1FACEED700392CB8 /* PullUpController.swift */, - ); - path = PullUpController; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - AC1A74C31FACEEAD00392CB8 /* PullUpControllerDemo */ = { - isa = PBXNativeTarget; - buildConfigurationList = AC1A74D61FACEEAE00392CB8 /* Build configuration list for PBXNativeTarget "PullUpControllerDemo" */; - buildPhases = ( - AC1A74C01FACEEAD00392CB8 /* Sources */, - AC1A74C11FACEEAD00392CB8 /* Frameworks */, - AC1A74C21FACEEAD00392CB8 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PullUpControllerDemo; - productName = SliderControllerDemo; - productReference = AC1A74C41FACEEAD00392CB8 /* PullUpControllerDemo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - AC1A74BC1FACEEAD00392CB8 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0910; - LastUpgradeCheck = 0910; - ORGANIZATIONNAME = Mario; - TargetAttributes = { - AC1A74C31FACEEAD00392CB8 = { - CreatedOnToolsVersion = 9.1; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = AC1A74BF1FACEEAD00392CB8 /* Build configuration list for PBXProject "PullUpControllerDemo" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = AC1A74BB1FACEEAD00392CB8; - productRefGroup = AC1A74C51FACEEAD00392CB8 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - AC1A74C31FACEEAD00392CB8 /* PullUpControllerDemo */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - AC1A74C21FACEEAD00392CB8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AC1A74D21FACEEAE00392CB8 /* LaunchScreen.storyboard in Resources */, - AC1A74CF1FACEEAE00392CB8 /* Assets.xcassets in Resources */, - AC1A74CD1FACEEAE00392CB8 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - AC1A74C01FACEEAD00392CB8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AC1A74CA1FACEEAE00392CB8 /* MapViewController.swift in Sources */, - AC1A74DB1FACEED700392CB8 /* PullUpController.swift in Sources */, - AC1A74DD1FACF09000392CB8 /* SearchViewController.swift in Sources */, - AC1A74C81FACEEAE00392CB8 /* AppDelegate.swift in Sources */, - ACE403581FADF1C500898D01 /* SearchResultCell.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - AC1A74CB1FACEEAE00392CB8 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - AC1A74CC1FACEEAE00392CB8 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - AC1A74D01FACEEAE00392CB8 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - AC1A74D11FACEEAE00392CB8 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - AC1A74D41FACEEAE00392CB8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - AC1A74D51FACEEAE00392CB8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - AC1A74D71FACEEAE00392CB8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PullUpControllerDemo/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.marioiannotta.PullUpControllerDemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - AC1A74D81FACEEAE00392CB8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = PullUpControllerDemo/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.marioiannotta.PullUpControllerDemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - AC1A74BF1FACEEAD00392CB8 /* Build configuration list for PBXProject "PullUpControllerDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - AC1A74D41FACEEAE00392CB8 /* Debug */, - AC1A74D51FACEEAE00392CB8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - AC1A74D61FACEEAE00392CB8 /* Build configuration list for PBXNativeTarget "PullUpControllerDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - AC1A74D71FACEEAE00392CB8 /* Debug */, - AC1A74D81FACEEAE00392CB8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = AC1A74BC1FACEEAD00392CB8 /* Project object */; -} diff --git a/PullUpControllerDemo/MapViewController.swift b/PullUpControllerDemo/MapViewController.swift deleted file mode 100644 index d474c6a..0000000 --- a/PullUpControllerDemo/MapViewController.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// MapViewController.swift -// PullUpControllerDemo -// -// Created by Mario on 03/11/2017. -// Copyright © 2017 Mario. All rights reserved. -// - -import UIKit -import MapKit - -class MapViewController: UIViewController { - - @IBOutlet private weak var mapView: MKMapView! - - override func viewDidLoad() { - super.viewDidLoad() - - addPullUpController() - } - - private func addPullUpController() { - guard - let pullUpController = UIStoryboard(name: "Main", bundle: nil) - .instantiateViewController(withIdentifier: "SearchViewController") as? SearchViewController - else { return } - - addPullUpController(pullUpController) - } - - func zoom(to location: CLLocationCoordinate2D) { - let span = MKCoordinateSpan(latitudeDelta: 0.05, longitudeDelta: 0.05) - let region = MKCoordinateRegionMake(location, span) - - mapView.setRegion(region, animated: true) - } -} - diff --git a/README.md b/README.md index b314248..617aa06 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,11 @@ Create your own pull up controller with multiple sticky points like in iOS Maps [![Platform](http://img.shields.io/badge/platform-ios-red.svg?style=flat )](https://developer.apple.com/iphone/index.action) -[![Swift 4](https://img.shields.io/badge/Swift-4-orange.svg?style=flat)](https://developer.apple.com/swift/) +[![Swift 5](https://img.shields.io/badge/Swift-5-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Cocoapods Compatible](https://img.shields.io/cocoapods/v/PullUpController.svg)](https://img.shields.io/cocoapods/v/PullUpController.svg) +[![Maintainability](https://api.codeclimate.com/v1/badges/ab0e3ab724774c9b5974/maintainability)](https://codeclimate.com/github/MarioIannotta/PullUpController/maintainability) - + # Features - Multiple *sticky* points @@ -16,48 +17,61 @@ Create your own pull up controller with multiple sticky points like in iOS Maps # Setup 1. Add `pod 'PullUpController'` to your Podfile or copy `PullUpController.swift` into your project 2. Make sure the view controller that will be your pull up controller inherits from `PullUpController` -3. Add the controller as child of your main controller using `addPullUpController(<#T##PullUpController#>)` +3. Add the controller as child of your main controller using `addPullUpController(<#T##PullUpController#>, initialStickyPointOffset: <#T##CGFloat#>, animated: <#T##Bool#>)` # Customization You can customize the controller behavior by overriding the followings properties: -`pullUpControllerPreviewOffset: CGFloat` ->The desired height in screen units expressed in the pull up controller coordinate system that will be initially showed. ->The default value is ```50``` - `pullUpControllerPreferredSize: CGSize` >The desired size of the pull up controller’s view, in screen units. >The default value is width: `UIScreen.main.bounds.width, height: 400`. +`pullUpControllerPreferredLandscapeFrame: CGRect` +>The desired size of the pull up controller’s view, in screen units when the device is in landscape mode. +>The default value is `(x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20)`. + `pullUpControllerMiddleStickyPoints: [CGFloat]` >A list of y values, in screen units expressed in the pull up controller coordinate system. >At the end of the gestures the pull up controller will scroll to the nearest point in the list. > ->Please keep in mind that this array should contains only sticky points in the middle of the pull up controller's view; ->There is therefore no need to add the fist one (`pullUpControllerPreviewOffset`), and/or the last one (`pullUpControllerPreferredSize.height`). -> >For a complete list of all the sticky points you can use `pullUpControllerAllStickyPoints` -`pullUpControllerAllStickyPoints: [CGFloat]` ->A list of y values, in screen units expressed in the pull up controller coordinate system. ->At the end of the gesture the pull up controller will scroll at the nearest point in the list. - -`pullUpControllerIsBouncingEnabled: Bool` ->A Boolean value that determines whether bouncing occurs when scrolling reaches the end of the pull up controller's view size. ->The default value is `false`. - -`pullUpControllerPreferredLandscapeFrame: CGRect` ->The desired size of the pull up controller’s view, in screen units when the device is in landscape mode. ->The default value is `(x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20)`. +`pullUpControllerBounceOffset: CGFloat` +>A CGFloat value that determines how much the pull up controller's view can bounce outside it's size. +>The default value is 0 and that means the the view cannot expand beyond its size. -It's possible to change the view controller's view position by using the method -`pullUpControllerMoveToVisiblePoint(_ visiblePoint: CGFloat, completion: (() -> Void)?)` +It's possible to change the view controller's view position programmatically by using the method +`pullUpControllerMoveToVisiblePoint(_ visiblePoint: CGFloat, animated: Bool, completion: (() -> Void)?)` >This method will move the pull up controller's view in order to show the provided visible point. > >You may use on of `pullUpControllerAllStickyPoints` item to provide a valid visible point. >- `visiblePoint`: the y value to make visible, in screen units expressed in the pull up controller coordinate system. ->- `completion`: The closure to execute after the animation is completed. This block has no return value and takes no parameters. You may specify nil for this parameter. +>- `animated`: a true value will move the view with an animation. +>- `completion`: the closure to execute after the animation is completed. This block has no return value and takes no parameters. You may specify nil for this parameter. + +By overriding the following method it is possible to customize all the animations performed by the controller's view. +` pullUpControllerAnimate(action: Action, + withDuration duration: TimeInterval, + animations: @escaping () -> Void, + completion: ((Bool) -> Void)?)` + +>You can consider override this method and customize the animation using the method +>`UIView.animate(withDuration:, delay:, usingSpringWithDamping:, initialSpringVelocity:, options:, animations:, completion:)` +>- `parameter`: The action that is about to be performed (.add, .remove or .move) +>- `duration`: The total duration of the animations, measured in seconds. If you specify a negative value or 0, the changes are made without animating them. +>-`animations`: A block object containing the changes to commit to the views. +>`completion`: A block object to be executed when the animation sequence ends. + +It is possible to observe the PullUpController's view state by overriding those methods: +`pullUpControllerWillMove(to point: CGFloat)` +>This method is called before the pull up controller's view move to a sticky point. + +`pullUpControllerDidMove(to point: CGFloat)` +>This method is called after the pull up controller's view move to a point. + +`pullUpControllerDidDrag(to point: CGFloat)` +>This method is called after the pull up controller's view is dragged to a point. PullUpController is easy draggable even if your `PullUpController`'s view contains a `UIScrollView`, just attach it to the controller itself with the following method: `<#T##UIScrollView#>.attach(to: <#T##PullUpController#>)` diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj new file mode 120000 index 0000000..3c5a8e7 --- /dev/null +++ b/_Pods.xcodeproj @@ -0,0 +1 @@ +Example/Pods/Pods.xcodeproj \ No newline at end of file