├── .gitignore ├── .swift-version ├── .travis.yml ├── Example ├── Podfile ├── URExampleScrollingAnimator.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── URExampleScrollingAnimator.xcscheme ├── URExampleScrollingAnimator.xcworkspace │ └── contents.xcworkspacedata ├── URExampleScrollingAnimator │ ├── 747-tailstrike.gif │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── cloud1.imageset │ │ │ ├── Contents.json │ │ │ └── cloud_PNG16.png │ │ ├── cloud2.imageset │ │ │ ├── Contents.json │ │ │ └── cloud_01_png_by_heroys-d7xym3w.png │ │ ├── cloud3.imageset │ │ │ ├── Contents.json │ │ │ └── cloud_close_png_by_digitalwideresource-d4ldq0t.png │ │ ├── cloud_by_ur2.imageset │ │ │ ├── Contents.json │ │ │ └── cloud_by_ur2.png │ │ ├── gosu1.imageset │ │ │ ├── CZnK-DVWYAAqVsa.jpg │ │ │ └── Contents.json │ │ ├── gosu2.imageset │ │ │ ├── 200532231_700.jpg │ │ │ └── Contents.json │ │ ├── joinsung1.imageset │ │ │ ├── Contents.json │ │ │ └── i.aspx.jpeg │ │ ├── joinsung2.imageset │ │ │ ├── 16.png │ │ │ └── Contents.json │ │ ├── joinsung3.imageset │ │ │ ├── CH88621551_w666_h968.JPG │ │ │ └── Contents.json │ │ ├── jongsuk1.imageset │ │ │ ├── 70fad9a9eb556a966bf114da209e7ac0.jpg │ │ │ └── Contents.json │ │ ├── jungwoosung1.imageset │ │ │ ├── 1210788110_2cnY5z6x_ECA095EC9AB0EC84B1_XTM_EAB090EB8F852.png │ │ │ └── Contents.json │ │ ├── jungwoosung2.imageset │ │ │ ├── Contents.json │ │ │ └── maxresdefault.jpg │ │ ├── mountain1.imageset │ │ │ ├── Contents.json │ │ │ └── Mountain-PNG.png │ │ ├── mountain2.imageset │ │ │ ├── Contents.json │ │ │ └── footer-mountains.png │ │ ├── mountain3.imageset │ │ │ ├── Contents.json │ │ │ └── Mountain_Man.png │ │ ├── mountain_by_ur2.imageset │ │ │ ├── Contents.json │ │ │ └── mountain_by_ur2.png │ │ ├── seokangjun1.imageset │ │ │ ├── Contents.json │ │ │ └── _.jpg │ │ ├── seokangjun2.imageset │ │ │ ├── Contents.json │ │ │ └── pic_002.jpg │ │ ├── seolhyun1.imageset │ │ │ ├── Contents.json │ │ │ └── R1280x0.jpeg │ │ ├── seolhyun2.imageset │ │ │ ├── Contents.json │ │ │ └── image_3e851409-b792-4211-b1fc-1c7f3515695a.png │ │ ├── seolhyun3.imageset │ │ │ ├── Contents.json │ │ │ └── tumblr_o1paghiOt81ss09k4o1_1280.jpg │ │ ├── seolhyun4.imageset │ │ │ ├── 20160509_044404.jpg │ │ │ └── Contents.json │ │ ├── suzy1.imageset │ │ │ ├── 2hnxrw4.jpg │ │ │ └── Contents.json │ │ ├── suzy2.imageset │ │ │ ├── 3714936a9cf70502e0a5842b9e546f35.jpg │ │ │ └── Contents.json │ │ ├── suzy3.imageset │ │ │ ├── Contents.json │ │ │ └── susie4.jpg │ │ └── suzy4.imageset │ │ │ ├── Contents.json │ │ │ └── susie5.jpg │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Gear_pump_animation.gif │ ├── Info.plist │ ├── URExample2ViewController.swift │ ├── URExampleDetailViewController.swift │ ├── URExampleTableViewCell.swift │ └── animationAssets │ │ ├── data.json │ │ └── images │ │ ├── img_0.png │ │ ├── img_1.png │ │ └── img_2.png └── URExampleScrollingAnimatorUITests │ ├── Info.plist │ └── URExampleScrollingAnimatorUITests.swift ├── LICENSE ├── Podfile ├── README.md ├── Resources ├── parallaxScrolling+PullToRefresh1.gif └── project_setting.png ├── Sources ├── URParallaxScrollAnimatable.swift ├── URParallaxScrollAnimator.swift ├── URParallaxScrollAnimatorMakable.swift └── URParallaxScrollDelegate.swift ├── URParallaxScrollAnimator.podspec ├── URParallaxScrollAnimator.xcodeproj ├── URParallaxScrollAnimatorTests_Info.plist ├── URParallaxScrollAnimator_Info.plist ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── URParallaxScrollAnimator.xcscheme │ └── xcschememanagement.plist └── URParallaxScrollAnimator.xcworkspace └── contents.xcworkspacedata /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | Pods/ 47 | Podfile.lock 48 | 49 | # Carthage 50 | # 51 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 52 | # Carthage/Checkouts 53 | 54 | Carthage/Build 55 | 56 | # fastlane 57 | # 58 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 59 | # screenshots whenever they are needed. 60 | # For more information about the recommended setup visit: 61 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 62 | 63 | fastlane/report.xml 64 | fastlane/Preview.html 65 | fastlane/screenshots 66 | fastlane/test_output 67 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.2 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: swift 2 | osx_image: xcode8.3 3 | env: 4 | global: 5 | - LANG=en_US.UTF-8 6 | matrix: 7 | - PLATFORM="iOS" 8 | before_install: 9 | - rvm use system 10 | - sudo gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet 11 | - sudo gem install xcpretty --no-rdoc --no-ri --no-document --quiet 12 | - pod --version 13 | - pod repo update > /dev/null 14 | - cd ./Example 15 | - pod install 16 | script: 17 | - xcodebuild -scheme URExampleScrollingAnimator -workspace URExampleScrollingAnimator.xcworkspace -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=latest,name=iPhone 7' build test 18 | after_success: 19 | - bash <(curl -s https://codecov.io/bash) -cF ios 20 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'URExampleScrollingAnimator' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for URExampleScrollingAnimator 9 | pod 'URParallaxScrollAnimator', :path => '../' 10 | pod 'lottie-ios' 11 | pod 'YLGIFImage' 12 | 13 | end 14 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 852E7F9D67401AC3693ADB7C /* Pods_URExampleScrollingAnimator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEFFA942052901470CFD9F8B /* Pods_URExampleScrollingAnimator.framework */; }; 11 | 971D9FBB1E8CE54D002BB42E /* URExampleDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971D9FBA1E8CE54D002BB42E /* URExampleDetailViewController.swift */; }; 12 | 971D9FD11E8D0AEA002BB42E /* data.json in Resources */ = {isa = PBXBuildFile; fileRef = 971D9FD01E8D0AEA002BB42E /* data.json */; }; 13 | 971D9FD51E8D0AF3002BB42E /* img_0.png in Resources */ = {isa = PBXBuildFile; fileRef = 971D9FD21E8D0AF3002BB42E /* img_0.png */; }; 14 | 971D9FD61E8D0AF3002BB42E /* img_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 971D9FD31E8D0AF3002BB42E /* img_1.png */; }; 15 | 971D9FD71E8D0AF3002BB42E /* img_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 971D9FD41E8D0AF3002BB42E /* img_2.png */; }; 16 | 973B79531E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 973B79521E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.swift */; }; 17 | 9743C5B61E88A50E00F570ED /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9743C5B51E88A50E00F570ED /* AppDelegate.swift */; }; 18 | 9743C5BB1E88A50E00F570ED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9743C5B91E88A50E00F570ED /* Main.storyboard */; }; 19 | 9743C5BD1E88A50E00F570ED /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9743C5BC1E88A50E00F570ED /* Assets.xcassets */; }; 20 | 9743C5C01E88A50E00F570ED /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9743C5BE1E88A50E00F570ED /* LaunchScreen.storyboard */; }; 21 | 9743C5C81E88A61300F570ED /* URExampleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9743C5C71E88A61300F570ED /* URExampleTableViewCell.swift */; }; 22 | 97D46CD81E94F31E002771E6 /* URExample2ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97D46CD71E94F31E002771E6 /* URExample2ViewController.swift */; }; 23 | 97D944CB1E975E01005FB9AB /* Gear_pump_animation.gif in Resources */ = {isa = PBXBuildFile; fileRef = 97D944CA1E975E01005FB9AB /* Gear_pump_animation.gif */; }; 24 | 97D944CD1E975E1A005FB9AB /* 747-tailstrike.gif in Resources */ = {isa = PBXBuildFile; fileRef = 97D944CC1E975E1A005FB9AB /* 747-tailstrike.gif */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 973B79551E89F9FD0097A9F1 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 9743C5AA1E88A50E00F570ED /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 9743C5B11E88A50E00F570ED; 33 | remoteInfo = URExampleScrollingAnimator; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 606E1DBE38ED2391C7A8D4A9 /* Pods-URExampleScrollingAnimator.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-URExampleScrollingAnimator.debug.xcconfig"; path = "Pods/Target Support Files/Pods-URExampleScrollingAnimator/Pods-URExampleScrollingAnimator.debug.xcconfig"; sourceTree = ""; }; 39 | 8D6DCD125E5D37143756DA83 /* Pods-URExampleScrollingAnimator.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-URExampleScrollingAnimator.release.xcconfig"; path = "Pods/Target Support Files/Pods-URExampleScrollingAnimator/Pods-URExampleScrollingAnimator.release.xcconfig"; sourceTree = ""; }; 40 | 971D9FBA1E8CE54D002BB42E /* URExampleDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URExampleDetailViewController.swift; sourceTree = ""; }; 41 | 971D9FD01E8D0AEA002BB42E /* data.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = data.json; path = animationAssets/data.json; sourceTree = ""; }; 42 | 971D9FD21E8D0AF3002BB42E /* img_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = img_0.png; path = animationAssets/images/img_0.png; sourceTree = ""; }; 43 | 971D9FD31E8D0AF3002BB42E /* img_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = img_1.png; path = animationAssets/images/img_1.png; sourceTree = ""; }; 44 | 971D9FD41E8D0AF3002BB42E /* img_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = img_2.png; path = animationAssets/images/img_2.png; sourceTree = ""; }; 45 | 973B79501E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = URExampleScrollingAnimatorUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 973B79521E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URExampleScrollingAnimatorUITests.swift; sourceTree = ""; }; 47 | 973B79541E89F9FD0097A9F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 9743C5B21E88A50E00F570ED /* URExampleScrollingAnimator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = URExampleScrollingAnimator.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 9743C5B51E88A50E00F570ED /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 50 | 9743C5BA1E88A50E00F570ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 9743C5BC1E88A50E00F570ED /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 9743C5BF1E88A50E00F570ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 9743C5C11E88A50E00F570ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 9743C5C71E88A61300F570ED /* URExampleTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URExampleTableViewCell.swift; sourceTree = ""; }; 55 | 97D46CD71E94F31E002771E6 /* URExample2ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URExample2ViewController.swift; sourceTree = ""; }; 56 | 97D944CA1E975E01005FB9AB /* Gear_pump_animation.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Gear_pump_animation.gif; sourceTree = ""; }; 57 | 97D944CC1E975E1A005FB9AB /* 747-tailstrike.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "747-tailstrike.gif"; sourceTree = ""; }; 58 | AEFFA942052901470CFD9F8B /* Pods_URExampleScrollingAnimator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_URExampleScrollingAnimator.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 973B794D1E89F9FD0097A9F1 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | 9743C5AF1E88A50E00F570ED /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | 852E7F9D67401AC3693ADB7C /* Pods_URExampleScrollingAnimator.framework in Frameworks */, 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | /* End PBXFrameworksBuildPhase section */ 78 | 79 | /* Begin PBXGroup section */ 80 | 776F59199BC4FCED95761D18 /* Pods */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 606E1DBE38ED2391C7A8D4A9 /* Pods-URExampleScrollingAnimator.debug.xcconfig */, 84 | 8D6DCD125E5D37143756DA83 /* Pods-URExampleScrollingAnimator.release.xcconfig */, 85 | ); 86 | name = Pods; 87 | sourceTree = ""; 88 | }; 89 | 7CB905E429838A602135649C /* Frameworks */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | AEFFA942052901470CFD9F8B /* Pods_URExampleScrollingAnimator.framework */, 93 | ); 94 | name = Frameworks; 95 | sourceTree = ""; 96 | }; 97 | 971D9FC61E8D01E6002BB42E /* animationAssets */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 971D9FD01E8D0AEA002BB42E /* data.json */, 101 | 971D9FC91E8D0213002BB42E /* images */, 102 | ); 103 | name = animationAssets; 104 | sourceTree = ""; 105 | }; 106 | 971D9FC91E8D0213002BB42E /* images */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 971D9FD21E8D0AF3002BB42E /* img_0.png */, 110 | 971D9FD31E8D0AF3002BB42E /* img_1.png */, 111 | 971D9FD41E8D0AF3002BB42E /* img_2.png */, 112 | ); 113 | name = images; 114 | sourceTree = ""; 115 | }; 116 | 973B79511E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 973B79521E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.swift */, 120 | 973B79541E89F9FD0097A9F1 /* Info.plist */, 121 | ); 122 | path = URExampleScrollingAnimatorUITests; 123 | sourceTree = ""; 124 | }; 125 | 9743C5A91E88A50E00F570ED = { 126 | isa = PBXGroup; 127 | children = ( 128 | 9743C5B41E88A50E00F570ED /* URExampleScrollingAnimator */, 129 | 973B79511E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests */, 130 | 97EC40281E94862C001A9BE5 /* Supports */, 131 | 9743C5B31E88A50E00F570ED /* Products */, 132 | 776F59199BC4FCED95761D18 /* Pods */, 133 | 7CB905E429838A602135649C /* Frameworks */, 134 | ); 135 | sourceTree = ""; 136 | }; 137 | 9743C5B31E88A50E00F570ED /* Products */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 9743C5B21E88A50E00F570ED /* URExampleScrollingAnimator.app */, 141 | 973B79501E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.xctest */, 142 | ); 143 | name = Products; 144 | sourceTree = ""; 145 | }; 146 | 9743C5B41E88A50E00F570ED /* URExampleScrollingAnimator */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 971D9FC61E8D01E6002BB42E /* animationAssets */, 150 | 9743C5B51E88A50E00F570ED /* AppDelegate.swift */, 151 | 9743C5C71E88A61300F570ED /* URExampleTableViewCell.swift */, 152 | 971D9FBA1E8CE54D002BB42E /* URExampleDetailViewController.swift */, 153 | 97D46CD71E94F31E002771E6 /* URExample2ViewController.swift */, 154 | 9743C5B91E88A50E00F570ED /* Main.storyboard */, 155 | 9743C5BC1E88A50E00F570ED /* Assets.xcassets */, 156 | 97D944CA1E975E01005FB9AB /* Gear_pump_animation.gif */, 157 | 97D944CC1E975E1A005FB9AB /* 747-tailstrike.gif */, 158 | 9743C5BE1E88A50E00F570ED /* LaunchScreen.storyboard */, 159 | 9743C5C11E88A50E00F570ED /* Info.plist */, 160 | ); 161 | path = URExampleScrollingAnimator; 162 | sourceTree = ""; 163 | }; 164 | 97EC40281E94862C001A9BE5 /* Supports */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | ); 168 | name = Supports; 169 | path = URExampleScrollingAnimatorUITests; 170 | sourceTree = ""; 171 | }; 172 | /* End PBXGroup section */ 173 | 174 | /* Begin PBXNativeTarget section */ 175 | 973B794F1E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 973B79591E89F9FD0097A9F1 /* Build configuration list for PBXNativeTarget "URExampleScrollingAnimatorUITests" */; 178 | buildPhases = ( 179 | 973B794C1E89F9FD0097A9F1 /* Sources */, 180 | 973B794D1E89F9FD0097A9F1 /* Frameworks */, 181 | 973B794E1E89F9FD0097A9F1 /* Resources */, 182 | ); 183 | buildRules = ( 184 | ); 185 | dependencies = ( 186 | 973B79561E89F9FD0097A9F1 /* PBXTargetDependency */, 187 | ); 188 | name = URExampleScrollingAnimatorUITests; 189 | productName = URExampleScrollingAnimatorUITests; 190 | productReference = 973B79501E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.xctest */; 191 | productType = "com.apple.product-type.bundle.ui-testing"; 192 | }; 193 | 9743C5B11E88A50E00F570ED /* URExampleScrollingAnimator */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 9743C5C41E88A50E00F570ED /* Build configuration list for PBXNativeTarget "URExampleScrollingAnimator" */; 196 | buildPhases = ( 197 | 39F96D5F4B785A8E9E0466A7 /* [CP] Check Pods Manifest.lock */, 198 | 9743C5AE1E88A50E00F570ED /* Sources */, 199 | 9743C5AF1E88A50E00F570ED /* Frameworks */, 200 | 9743C5B01E88A50E00F570ED /* Resources */, 201 | B69AEA4762C5F5644A464919 /* [CP] Embed Pods Frameworks */, 202 | 664E182E17D966390FE487E4 /* [CP] Copy Pods Resources */, 203 | ); 204 | buildRules = ( 205 | ); 206 | dependencies = ( 207 | ); 208 | name = URExampleScrollingAnimator; 209 | productName = URExampleScrollingAnimator; 210 | productReference = 9743C5B21E88A50E00F570ED /* URExampleScrollingAnimator.app */; 211 | productType = "com.apple.product-type.application"; 212 | }; 213 | /* End PBXNativeTarget section */ 214 | 215 | /* Begin PBXProject section */ 216 | 9743C5AA1E88A50E00F570ED /* Project object */ = { 217 | isa = PBXProject; 218 | attributes = { 219 | LastSwiftUpdateCheck = 0830; 220 | LastUpgradeCheck = 0910; 221 | ORGANIZATIONNAME = zigbang; 222 | TargetAttributes = { 223 | 973B794F1E89F9FD0097A9F1 = { 224 | CreatedOnToolsVersion = 8.3; 225 | DevelopmentTeam = 7AX2JZT3L8; 226 | ProvisioningStyle = Automatic; 227 | TestTargetID = 9743C5B11E88A50E00F570ED; 228 | }; 229 | 9743C5B11E88A50E00F570ED = { 230 | CreatedOnToolsVersion = 8.2.1; 231 | DevelopmentTeam = 7AX2JZT3L8; 232 | ProvisioningStyle = Automatic; 233 | }; 234 | }; 235 | }; 236 | buildConfigurationList = 9743C5AD1E88A50E00F570ED /* Build configuration list for PBXProject "URExampleScrollingAnimator" */; 237 | compatibilityVersion = "Xcode 3.2"; 238 | developmentRegion = English; 239 | hasScannedForEncodings = 0; 240 | knownRegions = ( 241 | en, 242 | Base, 243 | ); 244 | mainGroup = 9743C5A91E88A50E00F570ED; 245 | productRefGroup = 9743C5B31E88A50E00F570ED /* Products */; 246 | projectDirPath = ""; 247 | projectRoot = ""; 248 | targets = ( 249 | 9743C5B11E88A50E00F570ED /* URExampleScrollingAnimator */, 250 | 973B794F1E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests */, 251 | ); 252 | }; 253 | /* End PBXProject section */ 254 | 255 | /* Begin PBXResourcesBuildPhase section */ 256 | 973B794E1E89F9FD0097A9F1 /* Resources */ = { 257 | isa = PBXResourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | 9743C5B01E88A50E00F570ED /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 971D9FD51E8D0AF3002BB42E /* img_0.png in Resources */, 268 | 971D9FD11E8D0AEA002BB42E /* data.json in Resources */, 269 | 97D944CB1E975E01005FB9AB /* Gear_pump_animation.gif in Resources */, 270 | 9743C5C01E88A50E00F570ED /* LaunchScreen.storyboard in Resources */, 271 | 9743C5BD1E88A50E00F570ED /* Assets.xcassets in Resources */, 272 | 9743C5BB1E88A50E00F570ED /* Main.storyboard in Resources */, 273 | 971D9FD71E8D0AF3002BB42E /* img_2.png in Resources */, 274 | 97D944CD1E975E1A005FB9AB /* 747-tailstrike.gif in Resources */, 275 | 971D9FD61E8D0AF3002BB42E /* img_1.png in Resources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXResourcesBuildPhase section */ 280 | 281 | /* Begin PBXShellScriptBuildPhase section */ 282 | 39F96D5F4B785A8E9E0466A7 /* [CP] Check Pods Manifest.lock */ = { 283 | isa = PBXShellScriptBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | inputPaths = ( 288 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 289 | "${PODS_ROOT}/Manifest.lock", 290 | ); 291 | name = "[CP] Check Pods Manifest.lock"; 292 | outputPaths = ( 293 | "$(DERIVED_FILE_DIR)/Pods-URExampleScrollingAnimator-checkManifestLockResult.txt", 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | shellPath = /bin/sh; 297 | 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"; 298 | showEnvVarsInLog = 0; 299 | }; 300 | 664E182E17D966390FE487E4 /* [CP] Copy Pods Resources */ = { 301 | isa = PBXShellScriptBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | ); 305 | inputPaths = ( 306 | ); 307 | name = "[CP] Copy Pods Resources"; 308 | outputPaths = ( 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | shellPath = /bin/sh; 312 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-URExampleScrollingAnimator/Pods-URExampleScrollingAnimator-resources.sh\"\n"; 313 | showEnvVarsInLog = 0; 314 | }; 315 | B69AEA4762C5F5644A464919 /* [CP] Embed Pods Frameworks */ = { 316 | isa = PBXShellScriptBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | ); 320 | inputPaths = ( 321 | "${SRCROOT}/Pods/Target Support Files/Pods-URExampleScrollingAnimator/Pods-URExampleScrollingAnimator-frameworks.sh", 322 | "${PODS_ROOT}/Reveal-SDK/RevealServer-11/iOS/RevealServer.framework", 323 | "${BUILT_PRODUCTS_DIR}/URParallaxScrollAnimator/URParallaxScrollAnimator.framework", 324 | "${BUILT_PRODUCTS_DIR}/YLGIFImage/YLGIFImage.framework", 325 | "${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework", 326 | ); 327 | name = "[CP] Embed Pods Frameworks"; 328 | outputPaths = ( 329 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RevealServer.framework", 330 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/URParallaxScrollAnimator.framework", 331 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YLGIFImage.framework", 332 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lottie.framework", 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | shellPath = /bin/sh; 336 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-URExampleScrollingAnimator/Pods-URExampleScrollingAnimator-frameworks.sh\"\n"; 337 | showEnvVarsInLog = 0; 338 | }; 339 | /* End PBXShellScriptBuildPhase section */ 340 | 341 | /* Begin PBXSourcesBuildPhase section */ 342 | 973B794C1E89F9FD0097A9F1 /* Sources */ = { 343 | isa = PBXSourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | 973B79531E89F9FD0097A9F1 /* URExampleScrollingAnimatorUITests.swift in Sources */, 347 | ); 348 | runOnlyForDeploymentPostprocessing = 0; 349 | }; 350 | 9743C5AE1E88A50E00F570ED /* Sources */ = { 351 | isa = PBXSourcesBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | 9743C5C81E88A61300F570ED /* URExampleTableViewCell.swift in Sources */, 355 | 9743C5B61E88A50E00F570ED /* AppDelegate.swift in Sources */, 356 | 971D9FBB1E8CE54D002BB42E /* URExampleDetailViewController.swift in Sources */, 357 | 97D46CD81E94F31E002771E6 /* URExample2ViewController.swift in Sources */, 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | }; 361 | /* End PBXSourcesBuildPhase section */ 362 | 363 | /* Begin PBXTargetDependency section */ 364 | 973B79561E89F9FD0097A9F1 /* PBXTargetDependency */ = { 365 | isa = PBXTargetDependency; 366 | target = 9743C5B11E88A50E00F570ED /* URExampleScrollingAnimator */; 367 | targetProxy = 973B79551E89F9FD0097A9F1 /* PBXContainerItemProxy */; 368 | }; 369 | /* End PBXTargetDependency section */ 370 | 371 | /* Begin PBXVariantGroup section */ 372 | 9743C5B91E88A50E00F570ED /* Main.storyboard */ = { 373 | isa = PBXVariantGroup; 374 | children = ( 375 | 9743C5BA1E88A50E00F570ED /* Base */, 376 | ); 377 | name = Main.storyboard; 378 | sourceTree = ""; 379 | }; 380 | 9743C5BE1E88A50E00F570ED /* LaunchScreen.storyboard */ = { 381 | isa = PBXVariantGroup; 382 | children = ( 383 | 9743C5BF1E88A50E00F570ED /* Base */, 384 | ); 385 | name = LaunchScreen.storyboard; 386 | sourceTree = ""; 387 | }; 388 | /* End PBXVariantGroup section */ 389 | 390 | /* Begin XCBuildConfiguration section */ 391 | 973B79571E89F9FD0097A9F1 /* Debug */ = { 392 | isa = XCBuildConfiguration; 393 | buildSettings = { 394 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 395 | DEVELOPMENT_TEAM = 7AX2JZT3L8; 396 | INFOPLIST_FILE = URExampleScrollingAnimatorUITests/Info.plist; 397 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 399 | PRODUCT_BUNDLE_IDENTIFIER = com.zigbang.URExampleScrollingAnimatorUITests; 400 | PRODUCT_NAME = "$(TARGET_NAME)"; 401 | SWIFT_VERSION = 3.0; 402 | TEST_TARGET_NAME = URExampleScrollingAnimator; 403 | }; 404 | name = Debug; 405 | }; 406 | 973B79581E89F9FD0097A9F1 /* Release */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 410 | DEVELOPMENT_TEAM = 7AX2JZT3L8; 411 | INFOPLIST_FILE = URExampleScrollingAnimatorUITests/Info.plist; 412 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 414 | PRODUCT_BUNDLE_IDENTIFIER = com.zigbang.URExampleScrollingAnimatorUITests; 415 | PRODUCT_NAME = "$(TARGET_NAME)"; 416 | SWIFT_VERSION = 3.0; 417 | TEST_TARGET_NAME = URExampleScrollingAnimator; 418 | }; 419 | name = Release; 420 | }; 421 | 9743C5C21E88A50E00F570ED /* Debug */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | ALWAYS_SEARCH_USER_PATHS = NO; 425 | CLANG_ANALYZER_NONNULL = YES; 426 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 427 | CLANG_CXX_LIBRARY = "libc++"; 428 | CLANG_ENABLE_MODULES = YES; 429 | CLANG_ENABLE_OBJC_ARC = YES; 430 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 431 | CLANG_WARN_BOOL_CONVERSION = YES; 432 | CLANG_WARN_COMMA = YES; 433 | CLANG_WARN_CONSTANT_CONVERSION = YES; 434 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 435 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 436 | CLANG_WARN_EMPTY_BODY = YES; 437 | CLANG_WARN_ENUM_CONVERSION = YES; 438 | CLANG_WARN_INFINITE_RECURSION = YES; 439 | CLANG_WARN_INT_CONVERSION = YES; 440 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 441 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 442 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 443 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 444 | CLANG_WARN_STRICT_PROTOTYPES = YES; 445 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 446 | CLANG_WARN_UNREACHABLE_CODE = YES; 447 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 448 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 449 | COPY_PHASE_STRIP = NO; 450 | DEBUG_INFORMATION_FORMAT = dwarf; 451 | ENABLE_STRICT_OBJC_MSGSEND = YES; 452 | ENABLE_TESTABILITY = YES; 453 | GCC_C_LANGUAGE_STANDARD = gnu99; 454 | GCC_DYNAMIC_NO_PIC = NO; 455 | GCC_NO_COMMON_BLOCKS = YES; 456 | GCC_OPTIMIZATION_LEVEL = 0; 457 | GCC_PREPROCESSOR_DEFINITIONS = ( 458 | "DEBUG=1", 459 | "$(inherited)", 460 | ); 461 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 462 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 463 | GCC_WARN_UNDECLARED_SELECTOR = YES; 464 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 465 | GCC_WARN_UNUSED_FUNCTION = YES; 466 | GCC_WARN_UNUSED_VARIABLE = YES; 467 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 468 | MTL_ENABLE_DEBUG_INFO = YES; 469 | ONLY_ACTIVE_ARCH = YES; 470 | SDKROOT = iphoneos; 471 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 472 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 473 | }; 474 | name = Debug; 475 | }; 476 | 9743C5C31E88A50E00F570ED /* Release */ = { 477 | isa = XCBuildConfiguration; 478 | buildSettings = { 479 | ALWAYS_SEARCH_USER_PATHS = NO; 480 | CLANG_ANALYZER_NONNULL = YES; 481 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 482 | CLANG_CXX_LIBRARY = "libc++"; 483 | CLANG_ENABLE_MODULES = YES; 484 | CLANG_ENABLE_OBJC_ARC = YES; 485 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 486 | CLANG_WARN_BOOL_CONVERSION = YES; 487 | CLANG_WARN_COMMA = YES; 488 | CLANG_WARN_CONSTANT_CONVERSION = YES; 489 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 490 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 491 | CLANG_WARN_EMPTY_BODY = YES; 492 | CLANG_WARN_ENUM_CONVERSION = YES; 493 | CLANG_WARN_INFINITE_RECURSION = YES; 494 | CLANG_WARN_INT_CONVERSION = YES; 495 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 496 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 497 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 498 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 499 | CLANG_WARN_STRICT_PROTOTYPES = YES; 500 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 501 | CLANG_WARN_UNREACHABLE_CODE = YES; 502 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 503 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 504 | COPY_PHASE_STRIP = NO; 505 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 506 | ENABLE_NS_ASSERTIONS = NO; 507 | ENABLE_STRICT_OBJC_MSGSEND = YES; 508 | GCC_C_LANGUAGE_STANDARD = gnu99; 509 | GCC_NO_COMMON_BLOCKS = YES; 510 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 511 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 512 | GCC_WARN_UNDECLARED_SELECTOR = YES; 513 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 514 | GCC_WARN_UNUSED_FUNCTION = YES; 515 | GCC_WARN_UNUSED_VARIABLE = YES; 516 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 517 | MTL_ENABLE_DEBUG_INFO = NO; 518 | SDKROOT = iphoneos; 519 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 520 | VALIDATE_PRODUCT = YES; 521 | }; 522 | name = Release; 523 | }; 524 | 9743C5C51E88A50E00F570ED /* Debug */ = { 525 | isa = XCBuildConfiguration; 526 | baseConfigurationReference = 606E1DBE38ED2391C7A8D4A9 /* Pods-URExampleScrollingAnimator.debug.xcconfig */; 527 | buildSettings = { 528 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 529 | DEVELOPMENT_TEAM = 7AX2JZT3L8; 530 | INFOPLIST_FILE = URExampleScrollingAnimator/Info.plist; 531 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 532 | PRODUCT_BUNDLE_IDENTIFIER = com.zigbang.URExampleScrollingAnimator; 533 | PRODUCT_NAME = "$(TARGET_NAME)"; 534 | SWIFT_VERSION = 3.0; 535 | }; 536 | name = Debug; 537 | }; 538 | 9743C5C61E88A50E00F570ED /* Release */ = { 539 | isa = XCBuildConfiguration; 540 | baseConfigurationReference = 8D6DCD125E5D37143756DA83 /* Pods-URExampleScrollingAnimator.release.xcconfig */; 541 | buildSettings = { 542 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 543 | DEVELOPMENT_TEAM = 7AX2JZT3L8; 544 | INFOPLIST_FILE = URExampleScrollingAnimator/Info.plist; 545 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 546 | PRODUCT_BUNDLE_IDENTIFIER = com.zigbang.URExampleScrollingAnimator; 547 | PRODUCT_NAME = "$(TARGET_NAME)"; 548 | SWIFT_VERSION = 3.0; 549 | }; 550 | name = Release; 551 | }; 552 | /* End XCBuildConfiguration section */ 553 | 554 | /* Begin XCConfigurationList section */ 555 | 973B79591E89F9FD0097A9F1 /* Build configuration list for PBXNativeTarget "URExampleScrollingAnimatorUITests" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | 973B79571E89F9FD0097A9F1 /* Debug */, 559 | 973B79581E89F9FD0097A9F1 /* Release */, 560 | ); 561 | defaultConfigurationIsVisible = 0; 562 | defaultConfigurationName = Release; 563 | }; 564 | 9743C5AD1E88A50E00F570ED /* Build configuration list for PBXProject "URExampleScrollingAnimator" */ = { 565 | isa = XCConfigurationList; 566 | buildConfigurations = ( 567 | 9743C5C21E88A50E00F570ED /* Debug */, 568 | 9743C5C31E88A50E00F570ED /* Release */, 569 | ); 570 | defaultConfigurationIsVisible = 0; 571 | defaultConfigurationName = Release; 572 | }; 573 | 9743C5C41E88A50E00F570ED /* Build configuration list for PBXNativeTarget "URExampleScrollingAnimator" */ = { 574 | isa = XCConfigurationList; 575 | buildConfigurations = ( 576 | 9743C5C51E88A50E00F570ED /* Debug */, 577 | 9743C5C61E88A50E00F570ED /* Release */, 578 | ); 579 | defaultConfigurationIsVisible = 0; 580 | defaultConfigurationName = Release; 581 | }; 582 | /* End XCConfigurationList section */ 583 | }; 584 | rootObject = 9743C5AA1E88A50E00F570ED /* Project object */; 585 | } 586 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator.xcodeproj/xcshareddata/xcschemes/URExampleScrollingAnimator.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 35 | 41 | 42 | 43 | 44 | 45 | 51 | 52 | 53 | 54 | 55 | 56 | 67 | 69 | 75 | 76 | 77 | 78 | 79 | 80 | 86 | 88 | 94 | 95 | 96 | 97 | 99 | 100 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/747-tailstrike.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/747-tailstrike.gif -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // URExampleScrollingAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 3. 27.. 6 | // Copyright © 2017년 zigbang. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cloud_PNG16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud1.imageset/cloud_PNG16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/cloud1.imageset/cloud_PNG16.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cloud_01_png_by_heroys-d7xym3w.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud2.imageset/cloud_01_png_by_heroys-d7xym3w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/cloud2.imageset/cloud_01_png_by_heroys-d7xym3w.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cloud_close_png_by_digitalwideresource-d4ldq0t.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud3.imageset/cloud_close_png_by_digitalwideresource-d4ldq0t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/cloud3.imageset/cloud_close_png_by_digitalwideresource-d4ldq0t.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud_by_ur2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cloud_by_ur2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/cloud_by_ur2.imageset/cloud_by_ur2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/cloud_by_ur2.imageset/cloud_by_ur2.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/gosu1.imageset/CZnK-DVWYAAqVsa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/gosu1.imageset/CZnK-DVWYAAqVsa.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/gosu1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "CZnK-DVWYAAqVsa.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/gosu2.imageset/200532231_700.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/gosu2.imageset/200532231_700.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/gosu2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "200532231_700.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/joinsung1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "i.aspx.jpeg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/joinsung1.imageset/i.aspx.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/joinsung1.imageset/i.aspx.jpeg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/joinsung2.imageset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/joinsung2.imageset/16.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/joinsung2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/joinsung3.imageset/CH88621551_w666_h968.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/joinsung3.imageset/CH88621551_w666_h968.JPG -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/joinsung3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "CH88621551_w666_h968.JPG", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/jongsuk1.imageset/70fad9a9eb556a966bf114da209e7ac0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/jongsuk1.imageset/70fad9a9eb556a966bf114da209e7ac0.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/jongsuk1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "70fad9a9eb556a966bf114da209e7ac0.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/jungwoosung1.imageset/1210788110_2cnY5z6x_ECA095EC9AB0EC84B1_XTM_EAB090EB8F852.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/jungwoosung1.imageset/1210788110_2cnY5z6x_ECA095EC9AB0EC84B1_XTM_EAB090EB8F852.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/jungwoosung1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1210788110_2cnY5z6x_ECA095EC9AB0EC84B1_XTM_EAB090EB8F852.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/jungwoosung2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "maxresdefault.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/jungwoosung2.imageset/maxresdefault.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/jungwoosung2.imageset/maxresdefault.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Mountain-PNG.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain1.imageset/Mountain-PNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/mountain1.imageset/Mountain-PNG.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "footer-mountains.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain2.imageset/footer-mountains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/mountain2.imageset/footer-mountains.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Mountain_Man.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain3.imageset/Mountain_Man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/mountain3.imageset/Mountain_Man.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain_by_ur2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "mountain_by_ur2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/mountain_by_ur2.imageset/mountain_by_ur2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/mountain_by_ur2.imageset/mountain_by_ur2.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seokangjun1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "_.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seokangjun1.imageset/_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/seokangjun1.imageset/_.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seokangjun2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "pic_002.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seokangjun2.imageset/pic_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/seokangjun2.imageset/pic_002.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "R1280x0.jpeg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun1.imageset/R1280x0.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun1.imageset/R1280x0.jpeg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image_3e851409-b792-4211-b1fc-1c7f3515695a.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun2.imageset/image_3e851409-b792-4211-b1fc-1c7f3515695a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun2.imageset/image_3e851409-b792-4211-b1fc-1c7f3515695a.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr_o1paghiOt81ss09k4o1_1280.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun3.imageset/tumblr_o1paghiOt81ss09k4o1_1280.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun3.imageset/tumblr_o1paghiOt81ss09k4o1_1280.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun4.imageset/20160509_044404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun4.imageset/20160509_044404.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/seolhyun4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "20160509_044404.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy1.imageset/2hnxrw4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/suzy1.imageset/2hnxrw4.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2hnxrw4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy2.imageset/3714936a9cf70502e0a5842b9e546f35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/suzy2.imageset/3714936a9cf70502e0a5842b9e546f35.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "3714936a9cf70502e0a5842b9e546f35.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "susie4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy3.imageset/susie4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/suzy3.imageset/susie4.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "susie5.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Assets.xcassets/suzy4.imageset/susie5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Assets.xcassets/suzy4.imageset/susie5.jpg -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 117 | 123 | 129 | 139 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Gear_pump_animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/Gear_pump_animation.gif -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/URExample2ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URExample2ViewController.swift 3 | // URExampleScrollingAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 4. 5.. 6 | // Copyright © 2017년 zigbang. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import URParallaxScrollAnimator 11 | 12 | class URExample2ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { 13 | 14 | @IBOutlet var tableView: UITableView! 15 | 16 | @IBOutlet var slParallexScrollRatio: UISlider! 17 | @IBOutlet var lbParallexScrollRatioMin: UILabel! 18 | @IBOutlet var lbParallexScrollRatioMax: UILabel! 19 | @IBOutlet var lbParallexScrollRatioCurrent: UILabel! 20 | 21 | @IBOutlet var btnInitRatio: UIButton! 22 | 23 | @IBOutlet var swEnableHapticFeedback: UISwitch! 24 | @IBOutlet var swEnablePullToRefresh: UISwitch! 25 | 26 | var girlImages: [UIImage] = [#imageLiteral(resourceName: "suzy1"), #imageLiteral(resourceName: "suzy2"), #imageLiteral(resourceName: "suzy3"), #imageLiteral(resourceName: "suzy4"), #imageLiteral(resourceName: "seolhyun1"), #imageLiteral(resourceName: "seolhyun2"), #imageLiteral(resourceName: "seolhyun3"), #imageLiteral(resourceName: "seolhyun4")] 27 | var girlTexts: [String] = ["Suzy in korean transitional dress", "Suzy during an interview", "Smiling Suzy", "Brightly Smiling Suzy", "SeolHyun wearing a swimming suit", "SeolHyun standing nicely", "SeolHyun carrying a cute bag", "SeolHyun laying down"] 28 | 29 | var boyImages: [UIImage] = [#imageLiteral(resourceName: "seokangjun1"), #imageLiteral(resourceName: "seokangjun2"), #imageLiteral(resourceName: "joinsung1"), #imageLiteral(resourceName: "joinsung2"), #imageLiteral(resourceName: "joinsung3"), #imageLiteral(resourceName: "gosu1"), #imageLiteral(resourceName: "gosu2"), #imageLiteral(resourceName: "jungwoosung1"), #imageLiteral(resourceName: "jungwoosung2"), #imageLiteral(resourceName: "jongsuk1"), #imageLiteral(resourceName: "seokangjun1"), #imageLiteral(resourceName: "seokangjun2"), #imageLiteral(resourceName: "joinsung1"), #imageLiteral(resourceName: "joinsung2"), #imageLiteral(resourceName: "joinsung3"), #imageLiteral(resourceName: "gosu1"), #imageLiteral(resourceName: "gosu2"), #imageLiteral(resourceName: "jungwoosung1"), #imageLiteral(resourceName: "jungwoosung2"), #imageLiteral(resourceName: "jongsuk1"), #imageLiteral(resourceName: "seokangjun1"), #imageLiteral(resourceName: "seokangjun2"), #imageLiteral(resourceName: "joinsung1"), #imageLiteral(resourceName: "joinsung2"), #imageLiteral(resourceName: "joinsung3"), #imageLiteral(resourceName: "gosu1"), #imageLiteral(resourceName: "gosu2"), #imageLiteral(resourceName: "jungwoosung1"), #imageLiteral(resourceName: "jungwoosung2"), #imageLiteral(resourceName: "jongsuk1"), #imageLiteral(resourceName: "seokangjun1"), #imageLiteral(resourceName: "seokangjun2"), #imageLiteral(resourceName: "joinsung1"), #imageLiteral(resourceName: "joinsung2"), #imageLiteral(resourceName: "joinsung3"), #imageLiteral(resourceName: "gosu1"), #imageLiteral(resourceName: "gosu2"), #imageLiteral(resourceName: "jungwoosung1"), #imageLiteral(resourceName: "jungwoosung2"), #imageLiteral(resourceName: "jongsuk1")] 30 | var boyTexts: [String] = ["KangJun with 'V'", "KangJun in suit", "InSung's face at the left side", "InSung is looking at me", "Dandy InSung", "GoSu", "GoSu with scarf", "WooSung in suit", "WooSung is looking at somewhere", "JongSuk is smiling", "KangJun with 'V'", "KangJun in suit", "InSung's face at the left side", "InSung is looking at me", "Dandy InSung", "GoSu", "GoSu with scarf", "WooSung in suit", "WooSung is looking at somewhere", "JongSuk is smiling", "KangJun with 'V'", "KangJun in suit", "InSung's face at the left side", "InSung is looking at me", "Dandy InSung", "GoSu", "GoSu with scarf", "WooSung in suit", "WooSung is looking at somewhere", "JongSuk is smiling", "KangJun with 'V'", "KangJun in suit", "InSung's face at the left side", "InSung is looking at me", "Dandy InSung", "GoSu", "GoSu with scarf", "WooSung in suit", "WooSung is looking at somewhere", "JongSuk is smiling"] 31 | 32 | override func viewDidLoad() { 33 | super.viewDidLoad() 34 | // Do any additional setup after loading the view, typically from a nib. 35 | 36 | self.initView() 37 | } 38 | 39 | override func viewDidLayoutSubviews() { 40 | super.viewDidLayoutSubviews() 41 | } 42 | 43 | override func didReceiveMemoryWarning() { 44 | super.didReceiveMemoryWarning() 45 | // Dispose of any resources that can be recreated. 46 | } 47 | 48 | func initView() { 49 | self.btnInitRatio.layer.cornerRadius = 5.0 50 | 51 | self.lbParallexScrollRatioMin.text = "\(self.slParallexScrollRatio.minimumValue)" 52 | self.lbParallexScrollRatioMax.text = "\(self.slParallexScrollRatio.maximumValue)" 53 | self.lbParallexScrollRatioCurrent.text = "\(self.slParallexScrollRatio.value)" 54 | 55 | self.tableView.parallaxScrollExtension.makeParallaxScrollExtensionConfiguration(upperImage: #imageLiteral(resourceName: "cloud_by_ur2"), lowerImage: nil, lowerLottieData: "data") 56 | self.tableView.parallaxScrollExtension.refreshAction = { 57 | let indicatorView: UIActivityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.gray) 58 | let backView: UIView = UIView(frame: self.tableView.frame) 59 | backView.addSubview(indicatorView) 60 | indicatorView.center = backView.center 61 | self.view.addSubview(backView) 62 | backView.backgroundColor = UIColor(white: 0.5, alpha: 0.1) 63 | indicatorView.startAnimating() 64 | 65 | let timer: Timer = Timer.scheduledTimer(withTimeInterval: 3, repeats: false, block: { [weak self] (_) in 66 | guard let wself = self else { return } 67 | wself.tableView.parallaxScrollExtension.parallaxScrollViewDidPullToRefresh() 68 | backView.removeFromSuperview() 69 | }) 70 | 71 | RunLoop.main.add(timer, forMode: .commonModes) 72 | } 73 | self.tableView.parallaxScrollExtension.configuration.isEnabledPullToRefresh = self.swEnablePullToRefresh.isOn 74 | 75 | self.initValues() 76 | } 77 | 78 | func initValues() { 79 | self.slParallexScrollRatio.value = Float(URParallaxScrollConfiguration.DefaultParallaxScrollRatio) 80 | self.lbParallexScrollRatioCurrent.text = "\(URParallaxScrollConfiguration.DefaultParallaxScrollRatio)" 81 | 82 | self.tableView.parallaxScrollExtension.configuration.parallaxScrollRatio = URParallaxScrollConfiguration.DefaultParallaxScrollRatio 83 | self.tableView.parallaxScrollExtension.initScroll() 84 | self.tableView.parallaxScrollExtension.parallaxScrollViewDidPullToRefresh() 85 | } 86 | 87 | @IBAction func tapInitRatio(_ sender: Any) { 88 | self.initValues() 89 | } 90 | 91 | @IBAction func changeParallexScrollRatio(_ sender: Any) { 92 | let value = roundUp(Double(self.slParallexScrollRatio.value), roundUpPosition: 2) 93 | self.slParallexScrollRatio.setValue(Float(value), animated: false) 94 | self.lbParallexScrollRatioCurrent.text = "\(value)" 95 | 96 | self.tableView.parallaxScrollExtension.configuration.parallaxScrollRatio = CGFloat(value) 97 | } 98 | 99 | @IBAction func switchEnableHapticFeedback(_ sender: Any) { 100 | self.tableView.parallaxScrollExtension.configuration.isEnabledHapticFeedback = self.swEnableHapticFeedback.isOn 101 | } 102 | 103 | @IBAction func switchEnablePullToRefresh(_ sender: Any) { 104 | self.tableView.parallaxScrollExtension.configuration.isEnabledPullToRefresh = self.swEnablePullToRefresh.isOn 105 | } 106 | 107 | public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 108 | return self.boyImages.count 109 | } 110 | 111 | public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 112 | let cell = tableView.dequeueReusableCell(withIdentifier: "cell1", for: indexPath) as! URExampleTableViewCell 113 | 114 | cell.configView(image: self.boyImages[indexPath.row], text: self.boyTexts[indexPath.row]) 115 | 116 | return cell 117 | } 118 | 119 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 120 | tableView.deselectRow(at: indexPath, animated: true) 121 | 122 | self.tableView.parallaxScrollExtension.parallaxScrollViewDidPullToRefresh() 123 | } 124 | 125 | // MARK:- URParallaxScrollDelegate 126 | var preOffsetY: CGFloat = 0.0 127 | var preOffsetY1: CGFloat = 0.0 128 | 129 | func scrollViewDidScroll(_ scrollView: UIScrollView) { 130 | self.tableView.parallaxScrollExtension.parallaxScrollViewDidScroll(scrollView) 131 | } 132 | 133 | func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { 134 | self.tableView.parallaxScrollExtension.parallaxScrollViewWillBeginDragging(scrollView) 135 | } 136 | 137 | func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) { 138 | self.tableView.parallaxScrollExtension.parallaxScrollViewDidEndDragging(scrollView) 139 | } 140 | } 141 | 142 | func roundUp(_ value: Double, roundUpPosition: Int) -> Double { 143 | let roundUpPositionBy10 = pow(10.0, Double(roundUpPosition)) 144 | return round(value * roundUpPositionBy10) / roundUpPositionBy10 145 | } 146 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/URExampleDetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URExampleDetailViewController.swift 3 | // URExampleScrollingAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 3. 30.. 6 | // Copyright © 2017년 zigbang. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class URExampleDetailViewController: UIViewController { 12 | var i = 0 13 | 14 | @IBAction func tapped(_ sender: Any) { 15 | i += 1 16 | print("Running \(i)") 17 | 18 | switch i { 19 | case 1: 20 | let generator = UINotificationFeedbackGenerator() 21 | generator.notificationOccurred(.error) 22 | 23 | case 2: 24 | let generator = UINotificationFeedbackGenerator() 25 | generator.notificationOccurred(.success) 26 | 27 | case 3: 28 | let generator = UINotificationFeedbackGenerator() 29 | generator.notificationOccurred(.warning) 30 | 31 | case 4: 32 | let generator = UIImpactFeedbackGenerator(style: .light) 33 | generator.impactOccurred() 34 | 35 | case 5: 36 | let generator = UIImpactFeedbackGenerator(style: .medium) 37 | generator.impactOccurred() 38 | 39 | case 6: 40 | let generator = UIImpactFeedbackGenerator(style: .heavy) 41 | generator.impactOccurred() 42 | 43 | default: 44 | let generator = UISelectionFeedbackGenerator() 45 | generator.selectionChanged() 46 | i = 0 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/URExampleTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URExampleTableViewCell.swift 3 | // URExampleScrollingAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 3. 27.. 6 | // Copyright © 2017년 zigbang. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class URExampleTableViewCell: UITableViewCell { 12 | @IBOutlet var imgView: UIImageView! 13 | @IBOutlet var lbContent: UILabel! 14 | 15 | func configView(image: UIImage, text: String) { 16 | self.imgView.image = image 17 | 18 | self.lbContent.text = text 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/animationAssets/data.json: -------------------------------------------------------------------------------- 1 | {"assets":[{"id":"image_0","w":100,"h":100,"u":"images/","p":"img_0.png"},{"id":"image_1","w":100,"h":100,"u":"images/","p":"img_1.png"},{"id":"image_2","w":669,"h":157,"u":"images/","p":"img_2.png"}],"layers":[{"ddd":0,"ind":1,"ty":2,"nm":"obj01.png","cl":"png","refId":"image_0","ks":{"o":{"k":100},"r":{"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[360]},{"t":300}]},"p":{"k":[195.5,59.25,0]},"a":{"k":[50,50,0]},"s":{"k":[30,30,100]}},"ao":0,"ip":0,"op":300,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":2,"nm":"obj01.png","cl":"png","refId":"image_0","ks":{"o":{"k":100},"r":{"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[720]},{"t":300}]},"p":{"k":[456.75,31.75,0]},"a":{"k":[50,50,0]},"s":{"k":[41,41,100]}},"ao":0,"ip":0,"op":300,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":3,"ty":2,"nm":"obj02.png","cl":"png","refId":"image_1","ks":{"o":{"k":100},"r":{"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[360]},{"t":300}]},"p":{"k":[132.25,105,0]},"a":{"k":[50,50,0]},"s":{"k":[22,22,100]}},"ao":0,"ip":0,"op":300,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":4,"ty":2,"nm":"obj02.png","cl":"png","refId":"image_1","ks":{"o":{"k":100},"r":{"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[360]},{"t":300}]},"p":{"k":[626.75,81.25,0]},"a":{"k":[50,50,0]},"s":{"k":[34,34,100]}},"ao":0,"ip":0,"op":300,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":5,"ty":2,"nm":"city.png","cl":"png","refId":"image_2","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[360.5,100.5,0]},"a":{"k":[334.5,78.5,0]},"s":{"k":[100,100,100]}},"ao":0,"ip":0,"op":300,"st":0,"bm":0,"sr":1}],"v":"4.5.0","ddd":0,"ip":0,"op":300,"fr":30,"w":750,"h":187} -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/animationAssets/images/img_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/animationAssets/images/img_0.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/animationAssets/images/img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/animationAssets/images/img_1.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimator/animationAssets/images/img_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Example/URExampleScrollingAnimator/animationAssets/images/img_2.png -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimatorUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/URExampleScrollingAnimatorUITests/URExampleScrollingAnimatorUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URExampleScrollingAnimatorUITests.swift 3 | // URExampleScrollingAnimatorUITests 4 | // 5 | // Created by DongSoo Lee on 2017. 3. 28.. 6 | // Copyright © 2017년 zigbang. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class URExampleScrollingAnimatorUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Urtaq 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'URParallaxScrollAnimator' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for URParallaxScrollAnimator 9 | pod 'lottie-ios' 10 | 11 | target 'URParallaxScrollAnimatorTests' do 12 | inherit! :search_paths 13 | # Pods for testing 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # URParallaxScrollAnimator 2 | 3 | [![Swift](https://img.shields.io/badge/Swift-3.0%2B-orange.svg)](https://swift.org) [![podplatform](https://cocoapod-badges.herokuapp.com/p/URParallaxScrollAnimator/badge.png)](https://cocoapod-badges.herokuapp.com/p/URParallaxScrollAnimator/badge.png) [![pod](https://cocoapod-badges.herokuapp.com/v/URParallaxScrollAnimator/badge.png)](https://cocoapods.org/pods/URParallaxScrollAnimator) ![poddoc](https://img.shields.io/cocoapods/metrics/doc-percent/URParallaxScrollAnimator.svg) ![license](https://cocoapod-badges.herokuapp.com/l/URParallaxScrollAnimator/badge.png) ![travis](https://travis-ci.org/jegumhon/URParallaxScrollAnimator.svg?branch=master) [![codecov](https://codecov.io/gh/jegumhon/URParallaxScrollAnimator/branch/master/graph/badge.svg)](https://codecov.io/gh/jegumhon/URParallaxScrollAnimator) [![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg?style=flat)](https://github.com/CocoaPods/CocoaPods) 4 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjegumhon%2FURParallaxScrollAnimator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjegumhon%2FURParallaxScrollAnimator?ref=badge_shield) 5 | 6 | 7 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjegumhon%2FURParallaxScrollAnimator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjegumhon%2FURParallaxScrollAnimator?ref=badge_large) 8 | 9 | ## What is this? 10 | Show an animation as far as moved scroll while scrolling at the scroll view for **Swift3** 11 | This code style is the **`Protocol Oriented Programming`**. 12 | So some protocols are configured to implement the parallax scrolling. 13 | This extends the scrollView to make the parallax scrolling feature on the Run time, using objc_getAssociatedObject. 14 | 15 | To show the animation as scrolling, [Lottie](http://airbnb.design/lottie/) is able to be used instead of UIImageView. 16 | 17 | In addition to, you can provide the funny factor, [Haptic feedback](https://developer.apple.com/ios/human-interface-guidelines/interaction/feedback/). 18 | The haptic feedback is provided by scrolling down.(But only for iOS 10) 19 | 20 | ![sample](https://github.com/jegumhon/URParallaxScrollAnimator/blob/master/Resources/parallaxScrolling+PullToRefresh1.gif?raw=true) 21 | 22 | ## Requirements 23 | 24 | * iOS 8.1+ 25 | * Swift 3.0+ 26 | 27 | ## Installation 28 | 29 | ### Cocoapods 30 | 31 | Add the following to your `Podfile`. 32 | 33 | pod "URParallaxScrollAnimator" 34 | 35 | #### Dependancy 36 | 37 | [Lottie-iOS](https://github.com/airbnb/lottie-ios) 38 | 39 | ## Examples 40 | 41 | See the `Example` folder. 42 | Run `pod install` and open the .xcworkspace file. 43 | 44 | ## Usage 45 | 46 | ```swift 47 | import URParallaxScrollAnimator 48 | ``` 49 | 50 | #### 1. Set the Parallax Scroll maker 51 | ```swift 52 | // for example... 53 | func initView() { 54 | self.tableView.parallaxScrollExtension.makeParallaxScrollExtensionConfiguration(upperImage: #imageLiteral(resourceName: "cloud_by_ur2"), lowerImage: #imageLiteral(resourceName: "mountain_by_ur2"), lowerLottieData: nil) 55 | } 56 | ``` 57 | 58 | ##### 1.1. How to use Lottie 59 | * You can find the detail Lottie usage guide at the [Lottie-iOS](https://github.com/airbnb/lottie-ios) 60 | * add the lottie files in the project, and then just use the json file name to load the Lottie View 61 | ![sample](https://github.com/jegumhon/URParallaxScrollAnimator/blob/master/Resources/project_setting.png?raw=true) 62 | 63 | #### 2. Set the scroll handling functions in each UIScrollViewDelegate functions 64 | ```swift 65 | func scrollViewDidScroll(_ scrollView: UIScrollView) { 66 | ... 67 | self.tableView.parallaxScrollExtension.parallaxScrollViewDidScroll(scrollView) 68 | ... 69 | } 70 | 71 | func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { 72 | ... 73 | self.tableView.parallaxScrollExtension.parallaxScrollViewWillBeginDragging(scrollView) 74 | ... 75 | } 76 | 77 | func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) { 78 | ... 79 | self.tableView.parallaxScrollExtension.parallaxScrollViewDidEndDragging(scrollView) 80 | ... 81 | } 82 | ``` 83 | 84 | #### 3. Call the Pull to refresh finishing function, if you need the Pull to refresh in your app 85 | ```swift 86 | // for example, if calling the reload function, 87 | // you must call the "parallaxScrollViewDidPullToRefresh" function just after reloading 88 |    func handleAPICallFinish() { 89 | ... 90 | self.tableView.parallaxScrollExtension.parallaxScrollViewDidPullToRefresh() 91 | ... 92 | } 93 | ``` 94 | 95 | #### 4. 😀 Configurable parameters of URParallaxScrollAnimator 😀 96 | * **parallaxScrollRatio** : parallax ratio between the target scroll view and upper parallax view and lower parallax view. 97 | * **backgroundColor** : parallax scrollView's background color. 98 | * **isEnabledHapticFeedback** : enable the [Haptic feedback](https://developer.apple.com/ios/human-interface-guidelines/interaction/feedback/). Default is "true".(but this feature is only for **iOS 10**) 99 | * **isEnabledPullToRefresh** : enable the Pull to refresh. Default is "false". 100 | * **refreshAction** : callback to handle the Pull to refresh.(If you set this, "isEnabledPullToRefresh" is set automatically "true") 101 | 102 | ## To-Do 103 | 104 | - [ ] support gif for scrolling animation. 105 | 106 | ## License 107 | 108 | URParallaxScrollAnimator is available under the MIT license. See the [LICENSE](LICENSE) file for more info. -------------------------------------------------------------------------------- /Resources/parallaxScrolling+PullToRefresh1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Resources/parallaxScrolling+PullToRefresh1.gif -------------------------------------------------------------------------------- /Resources/project_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urtaq/URParallaxScrollAnimator/137f1de8afec4940b0b625ddff6267576093749c/Resources/project_setting.png -------------------------------------------------------------------------------- /Sources/URParallaxScrollAnimatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URParallaxScrollAnimatable.swift 3 | // URParallaxScrollAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 4. 6.. 6 | // 7 | // 8 | 9 | import Foundation 10 | import Lottie 11 | 12 | public protocol URParallaxScrollAnimatable: class { 13 | var upperLotAnimationView: LOTAnimationView! { get set } 14 | var lowerLotAnimationView: LOTAnimationView! { get set } 15 | 16 | func animateRefreshImage(progress: CGFloat, parallaxScrollType: URParallaxScrollAnimationType) 17 | } 18 | 19 | extension URParallaxScrollAnimatable where Self: URParallaxScrollAnimatorMakable { 20 | 21 | public func initLotAnimationView(position: URParallaxScrollViewPosition, data: String) { 22 | switch position { 23 | case .upper: 24 | self.upperLotAnimationView = LOTAnimationView(name: data) 25 | case .lower: 26 | self.lowerLotAnimationView = LOTAnimationView(name: data) 27 | default: 28 | break 29 | } 30 | } 31 | 32 | public func animateRefreshImage(progress: CGFloat = -1.0, parallaxScrollType: URParallaxScrollAnimationType) { 33 | switch parallaxScrollType { 34 | case .upperLayer: 35 | if self.upperLotAnimationView != nil { 36 | if progress < 0.0 { 37 | self.upperLotAnimationView.loopAnimation = true 38 | self.upperLotAnimationView.animationSpeed = 2.0 39 | self.upperLotAnimationView.play() 40 | } else { 41 | self.upperLotAnimationView.animationProgress = progress 42 | } 43 | } 44 | case .lowerLayer: 45 | if self.lowerLotAnimationView != nil { 46 | if progress < 0.0 { 47 | self.lowerLotAnimationView.loopAnimation = true 48 | self.lowerLotAnimationView.animationSpeed = 2.0 49 | self.lowerLotAnimationView.play() 50 | } else { 51 | self.lowerLotAnimationView.animationProgress = progress 52 | } 53 | } 54 | default: 55 | if self.upperLotAnimationView != nil { 56 | if progress < 0.0 { 57 | self.upperLotAnimationView.loopAnimation = true 58 | self.upperLotAnimationView.animationSpeed = 2.0 59 | self.upperLotAnimationView.play() 60 | } else { 61 | self.upperLotAnimationView.animationProgress = progress 62 | } 63 | } 64 | if self.lowerLotAnimationView != nil { 65 | 66 | if progress < 0.0 { 67 | self.lowerLotAnimationView.loopAnimation = true 68 | self.lowerLotAnimationView.animationSpeed = 2.0 69 | self.lowerLotAnimationView.play() 70 | } else { 71 | self.lowerLotAnimationView.animationProgress = progress 72 | } 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Sources/URParallaxScrollAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URParallaxScrollAnimator.swift 3 | // URParallaxScrollAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 4. 5.. 6 | // 7 | // 8 | 9 | import UIKit 10 | import Lottie 11 | 12 | public enum URParallaxScrollAnimationType { 13 | case upperLayer 14 | case lowerLayer 15 | case both 16 | } 17 | 18 | public enum URParallaxScrollViewPosition { 19 | case upper 20 | case lower 21 | case both 22 | } 23 | 24 | public enum URParallaxScrollVerticalDirection { 25 | case up 26 | case down 27 | } 28 | 29 | public struct URParallaxScrollConfiguration { 30 | public static let DefaultParallaxScrollRatio: CGFloat = 1.0 31 | public static let DefaultBackgroundColor: UIColor = UIColor(red: 1.0, green: CGFloat(0xae) / CGFloat(0xff), blue: 0.0, alpha: 1.0) 32 | 33 | public var parallaxScrollRatio: CGFloat = URParallaxScrollConfiguration.DefaultParallaxScrollRatio 34 | 35 | /// unused... 36 | var lowerParallaxScrollRatio: CGFloat { 37 | return self.parallaxScrollRatio * URParallaxScrollConfiguration.DefaultParallaxScrollRatio * 1.5 38 | } 39 | 40 | var parallaxScrollType: URParallaxScrollAnimationType = .both 41 | 42 | var backgroundColor: UIColor = DefaultBackgroundColor 43 | 44 | var upperImage: UIImage! 45 | var lowerImage: UIImage! 46 | 47 | var upperLottieData: String! 48 | var lowerLottieData: String! 49 | 50 | public var isEnabledPullToRefresh: Bool = false 51 | public var isEnabledHapticFeedback: Bool = true 52 | 53 | init(parallaxScrollRatio: CGFloat = URParallaxScrollConfiguration.DefaultParallaxScrollRatio, parallaxScrollType: URParallaxScrollAnimationType = .lowerLayer, backgroundColor: UIColor = DefaultBackgroundColor, upperImage: UIImage!, lowerImage: UIImage!, upperLottieData: String! = nil, lowerLottieData: String! = nil) { 54 | self.parallaxScrollRatio = parallaxScrollRatio 55 | self.parallaxScrollType = parallaxScrollType 56 | self.backgroundColor = backgroundColor 57 | 58 | if (upperImage != nil && upperLottieData != nil) || (lowerImage != nil && lowerLottieData != nil) { 59 | fatalError("You need to choose whether the image is UIImage or LottieAnimation!!") 60 | } 61 | 62 | self.upperImage = upperImage 63 | self.lowerImage = lowerImage 64 | 65 | self.upperLottieData = upperLottieData 66 | self.lowerLottieData = lowerLottieData 67 | } 68 | } 69 | 70 | public class URParallaxScrollExtension: NSObject, URParallaxScrollAnimatorMakable, URParallaxScrollAnimatable, URParallaxScrollDelegate { 71 | 72 | public var configuration: URParallaxScrollConfiguration! 73 | 74 | public var target: UIScrollView 75 | public var targetBackgroundColor: UIColor? 76 | 77 | public var blankView: UIView! 78 | 79 | public var upperScrollView: UIScrollView! 80 | public var upperImageView: UIImageView! 81 | public var upperScrollContentView: UIView! 82 | 83 | public var upperLotAnimationView: LOTAnimationView! 84 | 85 | public var lowerScrollView: UIScrollView! 86 | public var lowerImageView: UIImageView! 87 | 88 | public var lowerLotAnimationView: LOTAnimationView! 89 | 90 | public var delegateParallaxScroll: URParallaxScrollDelegate! 91 | 92 | public var startOffsetY: CGFloat = 0.0 93 | public var preOffsetYUpper: CGFloat = 0.0 94 | public var preOffsetYLower: CGFloat = 0.0 95 | public var isGestureReleased: Bool = false 96 | 97 | public var isTriggeredRefresh: Bool = false 98 | public var refreshAction: (() -> Void)? { 99 | didSet { 100 | self.configuration.isEnabledPullToRefresh = (self.refreshAction != nil) 101 | } 102 | } 103 | 104 | public var hapticFeedbackGenerator: NSObject? 105 | public var needHapticFeedback: Bool = true 106 | 107 | fileprivate init(_ base: UIScrollView) { 108 | self.target = base 109 | super.init() 110 | 111 | guard let _ = self.target.delegate else { 112 | fatalError("The tableview has to have the UITableViewDelegate instance!!") 113 | } 114 | } 115 | } 116 | 117 | struct AssociatedKey { 118 | static var extensionAddress: UInt8 = 0 119 | } 120 | 121 | extension UIScrollView { 122 | 123 | public var parallaxScrollExtension: URParallaxScrollExtension { 124 | guard let parallaxScrollEx = objc_getAssociatedObject(self, &AssociatedKey.extensionAddress) as? URParallaxScrollExtension else { 125 | let parallaxScrollEx: URParallaxScrollExtension = URParallaxScrollExtension(self) 126 | objc_setAssociatedObject(self, &AssociatedKey.extensionAddress, parallaxScrollEx, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 127 | return parallaxScrollEx 128 | } 129 | 130 | return parallaxScrollEx 131 | } 132 | } 133 | 134 | // MARK:- Util 135 | func roundUp(_ value: Double, roundUpPosition: Int) -> Double { 136 | let roundUpPositionBy10 = pow(10.0, Double(roundUpPosition)) 137 | return round(value * roundUpPositionBy10) / roundUpPositionBy10 138 | } 139 | -------------------------------------------------------------------------------- /Sources/URParallaxScrollAnimatorMakable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // URParallaxScrollAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 4. 6.. 6 | // 7 | // 8 | 9 | import UIKit 10 | import Lottie 11 | 12 | public protocol URParallaxScrollAnimatorMakable: class { 13 | var configuration: URParallaxScrollConfiguration! { get set } 14 | 15 | var target: UIScrollView { get set } 16 | var targetBackgroundColor: UIColor? { get set } 17 | 18 | var blankView: UIView! { get set } 19 | 20 | var upperScrollView: UIScrollView! { get set } 21 | var upperScrollContentView: UIView! { get set } 22 | var upperImageView: UIImageView! { get set } 23 | 24 | var lowerScrollView: UIScrollView! { get set } 25 | var lowerImageView: UIImageView! { get set } 26 | 27 | var isTriggeredRefresh: Bool { get set } 28 | var refreshAction: (() -> Void)? { get set } 29 | 30 | func makeParallaxScrollExtensionConfiguration(parallaxScrollRatio: CGFloat, 31 | parallaxScrollType: URParallaxScrollAnimationType, 32 | backgroundColor: UIColor, 33 | upperImage: UIImage!, 34 | lowerImage: UIImage!, 35 | upperLottieData: String!, 36 | lowerLottieData: String!) 37 | 38 | func initParallaxScrollViews() 39 | 40 | func initAnimatableParallaxScrollViews() 41 | } 42 | 43 | extension URParallaxScrollAnimatorMakable { 44 | 45 | fileprivate func configScrollView(position: URParallaxScrollViewPosition) { 46 | 47 | guard let superview = self.target.superview else { 48 | fatalError("[\(URParallaxScrollExtension.self)] This tableview needs the superview!!") 49 | } 50 | 51 | let upperScrollMaker: () -> Void = { 52 | self.upperScrollView = UIScrollView(frame: self.target.frame) 53 | superview.insertSubview(self.upperScrollView, belowSubview: self.target) 54 | 55 | self.upperScrollView.translatesAutoresizingMaskIntoConstraints = false 56 | 57 | superview.addConstraint(NSLayoutConstraint(item: self.upperScrollView, attribute: NSLayoutAttribute.leading, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.leading, multiplier: 1.0, constant: 0.0)) 58 | superview.addConstraint(NSLayoutConstraint(item: self.upperScrollView, attribute: NSLayoutAttribute.trailing, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.trailing, multiplier: 1.0, constant: 0.0)) 59 | superview.addConstraint(NSLayoutConstraint(item: self.upperScrollView, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.top, multiplier: 1.0, constant: 0.0)) 60 | superview.addConstraint(NSLayoutConstraint(item: self.upperScrollView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.bottom, multiplier: 1.0, constant: 0.0)) 61 | } 62 | 63 | let lowerScrollMaker: () -> Void = { 64 | self.lowerScrollView = UIScrollView(frame: self.target.frame) 65 | self.lowerScrollView.backgroundColor = self.configuration.backgroundColor 66 | superview.insertSubview(self.lowerScrollView, belowSubview: self.upperScrollView) 67 | 68 | self.lowerScrollView.translatesAutoresizingMaskIntoConstraints = false 69 | 70 | superview.addConstraint(NSLayoutConstraint(item: self.lowerScrollView, attribute: NSLayoutAttribute.leading, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.leading, multiplier: 1.0, constant: 0.0)) 71 | superview.addConstraint(NSLayoutConstraint(item: self.lowerScrollView, attribute: NSLayoutAttribute.trailing, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.trailing, multiplier: 1.0, constant: 0.0)) 72 | superview.addConstraint(NSLayoutConstraint(item: self.lowerScrollView, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.top, multiplier: 1.0, constant: 0.0)) 73 | superview.addConstraint(NSLayoutConstraint(item: self.lowerScrollView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: self.target, attribute: NSLayoutAttribute.bottom, multiplier: 1.0, constant: 0.0)) 74 | } 75 | 76 | switch position { 77 | case .upper: 78 | upperScrollMaker() 79 | case .lower: 80 | lowerScrollMaker() 81 | default: 82 | upperScrollMaker() 83 | lowerScrollMaker() 84 | } 85 | } 86 | 87 | fileprivate func configScrollContentView(position: URParallaxScrollViewPosition, contentView: UIView, size: CGSize, isAnimatableContent: Bool = false) { 88 | var scrollView: UIScrollView! 89 | 90 | switch position { 91 | case .upper: 92 | scrollView = self.upperScrollView 93 | 94 | scrollView.layoutIfNeeded() 95 | self.upperScrollContentView = UIView(frame: CGRect(origin: CGPoint.zero, size: scrollView.bounds.size)) 96 | self.upperScrollContentView.backgroundColor = UIColor.clear 97 | scrollView.addSubview(self.upperScrollContentView) 98 | 99 | self.upperScrollContentView.addSubview(contentView) 100 | contentView.translatesAutoresizingMaskIntoConstraints = false 101 | 102 | self.upperScrollContentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "|-0-[view]-0-|", options: [], metrics: nil, views: ["view" : contentView])) 103 | self.upperScrollContentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|-0-[view]", options: [], metrics: nil, views: ["view" : contentView])) 104 | contentView.addConstraint(NSLayoutConstraint(item: contentView, attribute: NSLayoutAttribute.width, relatedBy: NSLayoutRelation.equal, toItem: contentView, attribute: NSLayoutAttribute.height, multiplier: size.width / size.height, constant: 0.0)) 105 | 106 | self.makeBlankView(container: self.upperScrollContentView, contentView: contentView) 107 | case .lower: 108 | scrollView = self.lowerScrollView 109 | 110 | scrollView.addSubview(contentView) 111 | contentView.translatesAutoresizingMaskIntoConstraints = false 112 | 113 | scrollView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "|-0-[view]-0-|", options: [], metrics: nil, views: ["view" : contentView])) 114 | scrollView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|-0-[view]-0-|", options: [], metrics: nil, views: ["view" : contentView])) 115 | scrollView.addConstraint(NSLayoutConstraint(item: contentView, attribute: NSLayoutAttribute.width, relatedBy: NSLayoutRelation.equal, toItem: scrollView, attribute: NSLayoutAttribute.width, multiplier: 1.0, constant: 0.0)) 116 | // contentView.addConstraint(NSLayoutConstraint(item: contentView, attribute: NSLayoutAttribute.width, relatedBy: NSLayoutRelation.equal, toItem: contentView, attribute: NSLayoutAttribute.height, multiplier: size.width / size.height, constant: 0.0)) 117 | self.upperImageView.layoutIfNeeded() 118 | if isAnimatableContent { 119 | contentView.addConstraint(NSLayoutConstraint(item: contentView, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1.0, constant: self.upperImageView.bounds.height)) 120 | } else { 121 | contentView.addConstraint(NSLayoutConstraint(item: contentView, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1.0, constant: self.upperImageView.bounds.height)) 122 | } 123 | default: 124 | break 125 | } 126 | } 127 | 128 | /// make the blank area 129 | public func makeBlankView(container: UIView, contentView: UIView) { 130 | 131 | if self.blankView == nil { 132 | self.blankView = UIView() 133 | self.blankView.backgroundColor = UIColor.white 134 | container.addSubview(self.blankView) 135 | 136 | contentView.layoutIfNeeded() 137 | 138 | self.blankView.translatesAutoresizingMaskIntoConstraints = false 139 | container.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "|-0-[blank]-0-|", options: [], metrics: nil, views: ["blank" : self.blankView])) 140 | container.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:[content]-0-[blank]-contentHeight-|", options: [], metrics: ["contentHeight": -contentView.bounds.height], views: ["content" : contentView, "blank": self.blankView])) 141 | } else { 142 | self.blankView.isHidden = false 143 | } 144 | } 145 | 146 | public func hideBlankView() { 147 | self.blankView.isHidden = true 148 | } 149 | 150 | public func makeParallaxScrollExtensionConfiguration(parallaxScrollRatio: CGFloat = URParallaxScrollConfiguration.DefaultParallaxScrollRatio, 151 | parallaxScrollType: URParallaxScrollAnimationType = .lowerLayer, 152 | backgroundColor: UIColor = URParallaxScrollConfiguration.DefaultBackgroundColor, 153 | upperImage: UIImage!, 154 | lowerImage: UIImage!, 155 | upperLottieData: String! = nil, 156 | lowerLottieData: String! = nil) { 157 | self.configuration = URParallaxScrollConfiguration(parallaxScrollRatio: parallaxScrollRatio, parallaxScrollType: parallaxScrollType, backgroundColor: backgroundColor, upperImage: upperImage, lowerImage: lowerImage, upperLottieData: upperLottieData, lowerLottieData: lowerLottieData) 158 | self.targetBackgroundColor = self.target.backgroundColor 159 | 160 | self.initParallaxScrollViews() 161 | } 162 | 163 | public func initParallaxScrollViews() { 164 | if let image = self.configuration.upperImage { 165 | 166 | self.configScrollView(position: .upper) 167 | 168 | self.upperImageView = UIImageView(image: image) 169 | self.configScrollContentView(position: .upper, contentView: self.upperImageView, size: image.size) 170 | } 171 | 172 | if let image = self.configuration.lowerImage { 173 | 174 | self.configScrollView(position: .lower) 175 | 176 | self.lowerImageView = UIImageView(image: image) 177 | self.configScrollContentView(position: .lower, contentView: self.lowerImageView, size: image.size) 178 | } 179 | 180 | self.initAnimatableParallaxScrollViews() 181 | } 182 | } 183 | 184 | extension URParallaxScrollAnimatorMakable where Self: URParallaxScrollAnimatable { 185 | 186 | public func initAnimatableParallaxScrollViews() { 187 | if let data = self.configuration.upperLottieData { 188 | 189 | self.configScrollView(position: .upper) 190 | 191 | self.initLotAnimationView(position: .upper, data: data) 192 | self.configScrollContentView(position: .upper, contentView: self.upperLotAnimationView, size: self.upperLotAnimationView.bounds.size, isAnimatableContent: true) 193 | } 194 | 195 | if let data = self.configuration.lowerLottieData { 196 | 197 | self.configScrollView(position: .lower) 198 | 199 | self.initLotAnimationView(position: .lower, data: data) 200 | self.configScrollContentView(position: .lower, contentView: self.lowerLotAnimationView, size: self.lowerLotAnimationView.bounds.size, isAnimatableContent: true) 201 | } 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /Sources/URParallaxScrollDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URParallaxScrollDelegate.swift 3 | // URParallaxScrollAnimator 4 | // 5 | // Created by DongSoo Lee on 2017. 4. 6.. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol URParallaxScrollDelegate: class { 12 | // var delegateParallaxScroll: URParallaxScrollDelegate! { get set } 13 | 14 | var startOffsetY: CGFloat { get set } 15 | var preOffsetYUpper: CGFloat { get set } 16 | var preOffsetYLower: CGFloat { get set } 17 | var isGestureReleased: Bool { get set } 18 | 19 | func initScroll() 20 | 21 | var needHapticFeedback: Bool { get set } 22 | 23 | @available(iOS 10.0, *) 24 | var hapticFeedbackGenerator: NSObject? { get set } 25 | func generateHapticFeedback() 26 | 27 | func parallaxScrollViewDidScroll(_ scrollView: UIScrollView) 28 | 29 | func parallaxScrollViewWillBeginDragging(_ scrollView: UIScrollView) 30 | 31 | func parallaxScrollViewDidEndDragging(_ scrollView: UIScrollView) 32 | 33 | func parallaxScrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) 34 | 35 | /// must call, just after the pull to refresh is finished 36 | func parallaxScrollViewDidPullToRefresh() 37 | } 38 | 39 | extension URParallaxScrollDelegate where Self: URParallaxScrollAnimatorMakable, Self: URParallaxScrollAnimatable { 40 | 41 | public func initScroll() { 42 | // init values 43 | self.isTriggeredRefresh = false 44 | self.needHapticFeedback = true 45 | 46 | // init scroll position 47 | self.preOffsetYLower = (-self.upperImageView.bounds.height) * self.configuration.parallaxScrollRatio / URParallaxScrollConfiguration.DefaultParallaxScrollRatio 48 | self.lowerScrollView.contentOffset = CGPoint(x: self.lowerScrollView.contentOffset.x, y: self.preOffsetYLower) 49 | } 50 | 51 | public func prepareHapticFeedback() { 52 | if #available(iOS 10.0, *) { 53 | self.hapticFeedbackGenerator = UISelectionFeedbackGenerator() 54 | (self.hapticFeedbackGenerator as? UISelectionFeedbackGenerator)?.prepare() 55 | } 56 | } 57 | 58 | public func generateHapticFeedback() { 59 | if self.configuration.isEnabledHapticFeedback { 60 | if self.needHapticFeedback { 61 | if #available(iOS 10.0, *) { 62 | (self.hapticFeedbackGenerator as? UISelectionFeedbackGenerator)?.selectionChanged() 63 | } 64 | } 65 | } 66 | } 67 | 68 | public func parallaxScrollViewDidScroll(_ scrollView: UIScrollView) { 69 | if self.startOffsetY == 0.0 && scrollView.contentOffset.y > 0 { 70 | self.startOffsetY = scrollView.contentOffset.y 71 | } 72 | 73 | self.upperScrollView.backgroundColor = UIColor.clear 74 | self.target.backgroundColor = UIColor.clear 75 | 76 | let scrollDirection: URParallaxScrollVerticalDirection = (self.preOffsetYUpper > scrollView.contentOffset.y) ? .down : .up 77 | print(scrollDirection) 78 | 79 | let scrollRatio: CGFloat = self.upperImageView.bounds.height / scrollView.bounds.height * self.configuration.parallaxScrollRatio 80 | let limitImageScrollOffsetY: CGFloat = self.upperImageView.bounds.height / (1 - self.upperImageView.bounds.height / scrollView.bounds.height * self.configuration.parallaxScrollRatio) 81 | 82 | let progress: CGFloat = abs(scrollView.contentOffset.y) / limitImageScrollOffsetY 83 | // scroll offset range is not in the "pull to refresh" trigerring range. 84 | if limitImageScrollOffsetY >= abs(scrollView.contentOffset.y) { 85 | if scrollDirection == .up && scrollView.contentOffset.y >= 0 { 86 | self.upperScrollView.backgroundColor = self.targetBackgroundColor 87 | self.target.backgroundColor = self.targetBackgroundColor 88 | } 89 | var animationProgress: CGFloat = progress 90 | if self.configuration.isEnabledPullToRefresh { 91 | if self.isTriggeredRefresh && self.isGestureReleased && self.startOffsetY <= 0 { 92 | // prevent to be back... 93 | scrollView.setContentOffset(CGPoint(x: 0, y: limitImageScrollOffsetY * -1), animated: false) 94 | 95 | if scrollView.contentInset.top == 0 { 96 | scrollView.contentInset.top = limitImageScrollOffsetY 97 | 98 | guard let release = self.refreshAction else { return } 99 | DispatchQueue.main.async(execute: release) 100 | } 101 | 102 | animationProgress = -1.0 103 | } 104 | } 105 | 106 | self.upperScrollView.contentOffset = CGPoint(x: 0, y: scrollView.contentOffset.y * scrollRatio) 107 | self.lowerScrollView.contentOffset = CGPoint(x: 0, y: self.preOffsetYLower + self.preOffsetYLower * progress * -1 + scrollView.contentOffset.y * scrollRatio) 108 | 109 | self.generateHapticFeedback() 110 | 111 | self.animateRefreshImage(progress: animationProgress, parallaxScrollType: self.configuration.parallaxScrollType) 112 | } else { 113 | self.needHapticFeedback = false 114 | 115 | if scrollView.contentOffset.y > 0 { 116 | self.upperScrollView.backgroundColor = self.targetBackgroundColor 117 | self.target.backgroundColor = self.targetBackgroundColor 118 | } 119 | 120 | var animationProgress: CGFloat = 1.0 121 | if self.configuration.isEnabledPullToRefresh { 122 | if self.isTriggeredRefresh && self.isGestureReleased { 123 | animationProgress = -1.0 124 | } 125 | } 126 | 127 | self.animateRefreshImage(progress: animationProgress, parallaxScrollType: self.configuration.parallaxScrollType) 128 | 129 | self.upperScrollView.contentOffset = CGPoint(x: 0, y: self.upperScrollView.contentOffset.y + (scrollView.contentOffset.y - self.preOffsetYUpper)) 130 | self.lowerScrollView.contentOffset = CGPoint(x: 0, y: self.lowerScrollView.contentOffset.y + (scrollView.contentOffset.y - self.preOffsetYUpper)) 131 | } 132 | 133 | self.preOffsetYUpper = scrollView.contentOffset.y 134 | 135 | if scrollView.contentOffset.y == 0 { 136 | self.initScroll() 137 | } 138 | } 139 | 140 | public func parallaxScrollViewWillBeginDragging(_ scrollView: UIScrollView) { 141 | self.startOffsetY = 0.0 142 | 143 | self.needHapticFeedback = true 144 | self.prepareHapticFeedback() 145 | self.isGestureReleased = false 146 | 147 | if scrollView.contentOffset.y == 0 { 148 | self.initScroll() 149 | } 150 | } 151 | 152 | public func parallaxScrollViewDidEndDragging(_ scrollView: UIScrollView) { 153 | self.startOffsetY = 0.0 154 | self.needHapticFeedback = false 155 | if #available(iOS 10.0, *) { 156 | self.hapticFeedbackGenerator = nil 157 | } 158 | self.isGestureReleased = true 159 | 160 | self.animateRefreshImage(progress: 0.0, parallaxScrollType: self.configuration.parallaxScrollType) 161 | 162 | if self.configuration.isEnabledPullToRefresh { 163 | let limitImageScrollOffsetY: CGFloat = self.upperImageView.bounds.height / (1 - self.upperImageView.bounds.height / scrollView.bounds.height * self.configuration.parallaxScrollRatio) 164 | if limitImageScrollOffsetY >= abs(scrollView.contentOffset.y) { 165 | self.isTriggeredRefresh = false 166 | } else { 167 | self.isTriggeredRefresh = true 168 | } 169 | } 170 | } 171 | 172 | public func parallaxScrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) { 173 | } 174 | 175 | public func parallaxScrollViewDidPullToRefresh() { 176 | if self.configuration.isEnabledPullToRefresh { 177 | if self.isTriggeredRefresh { 178 | self.isTriggeredRefresh = false 179 | self.target.backgroundColor = self.targetBackgroundColor 180 | if self.target.contentInset.top != 0 { 181 | let insetTop: CGFloat = self.target.contentInset.top 182 | self.target.contentInset.top = 0 183 | self.target.setContentOffset(CGPoint(x: 0, y: insetTop * -1), animated: false) 184 | self.target.setContentOffset(CGPoint.zero, animated: true) 185 | } 186 | } 187 | } 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /URParallaxScrollAnimator.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint URParallaxScrollAnimator.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "URParallaxScrollAnimator" 19 | s.version = "1.2.1" 20 | s.summary = "Show an animation as far as moved scroll while scrolling at the scroll view" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | # s.description = <<-DESC 28 | # DESC 29 | 30 | s.homepage = "https://github.com/jegumhon/URParallaxScrollAnimator" 31 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 32 | 33 | 34 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 35 | # 36 | # Licensing your code is important. See http://choosealicense.com for more info. 37 | # CocoaPods will detect a license file if there is a named LICENSE* 38 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 39 | # 40 | 41 | s.license = { :type => "MIT", :file => "LICENSE" } 42 | 43 | 44 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 45 | # 46 | # Specify the authors of the library, with email addresses. Email addresses 47 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 48 | # accepts just a name if you'd rather not provide an email address. 49 | # 50 | # Specify a social_media_url where others can refer to, for example a twitter 51 | # profile URL. 52 | # 53 | 54 | s.author = { "jegumhon" => "jegumhon@gmail.com" } 55 | # Or just: s.author = "Urtaq" 56 | # s.authors = { "Urtaq" => "email@address.com" } 57 | s.social_media_url = "http://twitter.com/Jegumhon" 58 | 59 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 60 | # 61 | # If this Pod runs only on iOS or OS X, then specify the platform and 62 | # the deployment target. You can optionally include the target after the platform. 63 | # 64 | 65 | s.platform = :ios, "8.1" 66 | 67 | # When using multiple platforms 68 | # s.ios.deployment_target = "5.0" 69 | # s.osx.deployment_target = "10.7" 70 | # s.watchos.deployment_target = "2.0" 71 | # s.tvos.deployment_target = "9.0" 72 | 73 | 74 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 75 | # 76 | # Specify the location from where the source should be retrieved. 77 | # Supports git, hg, bzr, svn and HTTP. 78 | # 79 | 80 | s.source = { :git => "https://github.com/jegumhon/URParallaxScrollAnimator.git", :tag => "#{s.version}" } 81 | 82 | 83 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 84 | # 85 | # CocoaPods is smart about how it includes source code. For source files 86 | # giving a folder will include any swift, h, m, mm, c & cpp files. 87 | # For header files it will include any header in the folder. 88 | # Not including the public_header_files will make all headers public. 89 | # 90 | 91 | # s.source_files = "Sources", "Classes/**/*.{swift,h,m}" 92 | # s.exclude_files = "Example" 93 | 94 | # s.public_header_files = "Classes/**/*.h" 95 | 96 | s.default_subspec = "Core" 97 | 98 | s.subspec "Core" do |ss| 99 | ss.source_files = "Sources/*.swift" 100 | end 101 | 102 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 103 | # 104 | # A list of resources included with the Pod. These are copied into the 105 | # target bundle with a build phase script. Anything else will be cleaned. 106 | # You can preserve files from being cleaned, please don't preserve 107 | # non-essential files like tests, examples and documentation. 108 | # 109 | 110 | # s.resource = "icon.png" 111 | # s.resources = "Resources/*.png" 112 | 113 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 114 | 115 | 116 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 117 | # 118 | # Link your library with frameworks, or libraries. Libraries do not include 119 | # the lib prefix of their name. 120 | # 121 | 122 | # s.framework = "SomeFramework" 123 | # s.frameworks = "SomeFramework", "AnotherFramework" 124 | 125 | # s.library = "iconv" 126 | # s.libraries = "iconv", "xml2" 127 | 128 | 129 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 130 | # 131 | # If your library depends on compiler flags you can set them in the xcconfig hash 132 | # where they will only apply to your library. If you depend on other Podspecs 133 | # you can include multiple dependencies to ensure it works. 134 | 135 | # s.requires_arc = true 136 | 137 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 138 | s.dependency "lottie-ios" 139 | 140 | end 141 | -------------------------------------------------------------------------------- /URParallaxScrollAnimator.xcodeproj/URParallaxScrollAnimatorTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /URParallaxScrollAnimator.xcodeproj/URParallaxScrollAnimator_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /URParallaxScrollAnimator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /URParallaxScrollAnimator.xcodeproj/xcshareddata/xcschemes/URParallaxScrollAnimator.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 35 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 58 | 59 | 65 | 66 | 67 | 68 | 69 | 70 | 76 | 77 | 79 | 80 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /URParallaxScrollAnimator.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SchemeUserState 5 | 6 | URParallaxScrollAnimator.xcscheme 7 | 8 | 9 | SuppressBuildableAutocreation 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /URParallaxScrollAnimator.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | --------------------------------------------------------------------------------