├── .gitignore ├── LICENSE ├── LJWZoomiingHeaderView.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── LJWZoomiingHeaderView.xcworkspace └── contents.xcworkspacedata ├── LJWZoomiingHeaderView ├── 7494e68agb7a98471e34f&690.jpg ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── LJWZoomingHeader │ ├── .DS_Store │ ├── LJWZoomingHeaderControl.h │ ├── LJWZoomingHeaderControl.m │ ├── LJWZoomingHeaderDefine.h │ ├── LJWZoomingHeaderDefine.m │ ├── LJWZoomingHeaderViewProtocol.h │ ├── UIScrollView+LJWZoomingHeader.h │ ├── UIScrollView+LJWZoomingHeader.m │ ├── UIView+BelongController.h │ └── UIView+BelongController.m ├── TestZoomingHeaderView.h ├── TestZoomingHeaderView.m ├── ViewController.h ├── ViewController.m └── main.m ├── LJWZoomiingHeaderViewTests ├── Info.plist └── LJWZoomiingHeaderViewTests.m ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ └── XJJScrollViewObserver │ │ │ ├── UIScrollView+ContentOffsetObserver.h │ │ │ ├── UIScrollViewContentOffsetObserver.h │ │ │ └── UIScrollViewScrollInfo.h │ └── Public │ │ └── XJJScrollViewObserver │ │ ├── UIScrollView+ContentOffsetObserver.h │ │ ├── UIScrollViewContentOffsetObserver.h │ │ └── UIScrollViewScrollInfo.h ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj ├── Target Support Files │ ├── Pods-XJJScrollViewObserver │ │ ├── Pods-XJJScrollViewObserver-Private.xcconfig │ │ ├── Pods-XJJScrollViewObserver-dummy.m │ │ ├── Pods-XJJScrollViewObserver-prefix.pch │ │ └── Pods-XJJScrollViewObserver.xcconfig │ └── Pods │ │ ├── Pods-acknowledgements.markdown │ │ ├── Pods-acknowledgements.plist │ │ ├── Pods-dummy.m │ │ ├── Pods-environment.h │ │ ├── Pods-resources.sh │ │ ├── Pods.debug.xcconfig │ │ └── Pods.release.xcconfig └── XJJScrollViewObserver │ ├── LICENSE │ ├── README.md │ └── XJJScrollViewObserver │ ├── UIScrollView+ContentOffsetObserver.h │ ├── UIScrollView+ContentOffsetObserver.m │ ├── UIScrollViewContentOffsetObserver.h │ ├── UIScrollViewContentOffsetObserver.m │ ├── UIScrollViewScrollInfo.h │ └── UIScrollViewScrollInfo.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | .DS_Store 20 | 21 | # CocoaPods 22 | # 23 | # We recommend against adding the Pods directory to your .gitignore. However 24 | # you should judge for yourself, the pros and cons are mentioned at: 25 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 26 | # 27 | #Pods/ 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 可以用中文嘛 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 | 23 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4CDDB0B5C7FABABE1C264D47 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED458347D2EFE5021DB037D5 /* libPods.a */; }; 11 | 722AF1331BBE3F760016090A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AF1321BBE3F760016090A /* main.m */; }; 12 | 722AF1361BBE3F760016090A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AF1351BBE3F760016090A /* AppDelegate.m */; }; 13 | 722AF1391BBE3F760016090A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AF1381BBE3F760016090A /* ViewController.m */; }; 14 | 722AF13C1BBE3F760016090A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 722AF13A1BBE3F760016090A /* Main.storyboard */; }; 15 | 722AF13E1BBE3F760016090A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 722AF13D1BBE3F760016090A /* Images.xcassets */; }; 16 | 722AF1411BBE3F760016090A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 722AF13F1BBE3F760016090A /* LaunchScreen.xib */; }; 17 | 722AF14D1BBE3F760016090A /* LJWZoomiingHeaderViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AF14C1BBE3F760016090A /* LJWZoomiingHeaderViewTests.m */; }; 18 | 722AF15E1BBE509E0016090A /* 7494e68agb7a98471e34f&690.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 722AF15D1BBE509E0016090A /* 7494e68agb7a98471e34f&690.jpg */; }; 19 | 722AF16A1BBE5C980016090A /* UIScrollView+LJWZoomingHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AF1691BBE5C980016090A /* UIScrollView+LJWZoomingHeader.m */; }; 20 | 722AF16D1BBE604C0016090A /* LJWZoomingHeaderControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AF16C1BBE604C0016090A /* LJWZoomingHeaderControl.m */; }; 21 | 722AF1701BBE64F00016090A /* TestZoomingHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 722AF16F1BBE64F00016090A /* TestZoomingHeaderView.m */; }; 22 | 7233139C1BBFBD6300849364 /* UIView+BelongController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7233139B1BBFBD6300849364 /* UIView+BelongController.m */; }; 23 | 724D1A7F1BDE752D00344781 /* LJWZoomingHeaderDefine.m in Sources */ = {isa = PBXBuildFile; fileRef = 724D1A7E1BDE752D00344781 /* LJWZoomingHeaderDefine.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 722AF1471BBE3F760016090A /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 722AF1251BBE3F760016090A /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 722AF12C1BBE3F760016090A; 32 | remoteInfo = LJWZoomiingHeaderView; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 319D11543FA76EB92B99189A /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 38 | 722AF12D1BBE3F760016090A /* LJWZoomiingHeaderView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LJWZoomiingHeaderView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 722AF1311BBE3F760016090A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | 722AF1321BBE3F760016090A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 41 | 722AF1341BBE3F760016090A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 42 | 722AF1351BBE3F760016090A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 43 | 722AF1371BBE3F760016090A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 44 | 722AF1381BBE3F760016090A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 45 | 722AF13B1BBE3F760016090A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 722AF13D1BBE3F760016090A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 47 | 722AF1401BBE3F760016090A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 48 | 722AF1461BBE3F760016090A /* LJWZoomiingHeaderViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LJWZoomiingHeaderViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 722AF14B1BBE3F760016090A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | 722AF14C1BBE3F760016090A /* LJWZoomiingHeaderViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LJWZoomiingHeaderViewTests.m; sourceTree = ""; }; 51 | 722AF15D1BBE509E0016090A /* 7494e68agb7a98471e34f&690.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "7494e68agb7a98471e34f&690.jpg"; sourceTree = ""; }; 52 | 722AF1671BBE5C750016090A /* LJWZoomingHeaderViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LJWZoomingHeaderViewProtocol.h; sourceTree = ""; }; 53 | 722AF1681BBE5C980016090A /* UIScrollView+LJWZoomingHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+LJWZoomingHeader.h"; sourceTree = ""; }; 54 | 722AF1691BBE5C980016090A /* UIScrollView+LJWZoomingHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+LJWZoomingHeader.m"; sourceTree = ""; }; 55 | 722AF16B1BBE604C0016090A /* LJWZoomingHeaderControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LJWZoomingHeaderControl.h; sourceTree = ""; }; 56 | 722AF16C1BBE604C0016090A /* LJWZoomingHeaderControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LJWZoomingHeaderControl.m; sourceTree = ""; }; 57 | 722AF16E1BBE64F00016090A /* TestZoomingHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestZoomingHeaderView.h; sourceTree = ""; }; 58 | 722AF16F1BBE64F00016090A /* TestZoomingHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestZoomingHeaderView.m; sourceTree = ""; }; 59 | 7233139A1BBFBD6300849364 /* UIView+BelongController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+BelongController.h"; sourceTree = ""; }; 60 | 7233139B1BBFBD6300849364 /* UIView+BelongController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+BelongController.m"; sourceTree = ""; }; 61 | 724D1A7D1BDE752D00344781 /* LJWZoomingHeaderDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LJWZoomingHeaderDefine.h; sourceTree = ""; }; 62 | 724D1A7E1BDE752D00344781 /* LJWZoomingHeaderDefine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LJWZoomingHeaderDefine.m; sourceTree = ""; }; 63 | AAA0C21F91982DEC28FF117D /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 64 | ED458347D2EFE5021DB037D5 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | /* End PBXFileReference section */ 66 | 67 | /* Begin PBXFrameworksBuildPhase section */ 68 | 722AF12A1BBE3F760016090A /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | 4CDDB0B5C7FABABE1C264D47 /* libPods.a in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | 722AF1431BBE3F760016090A /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | 29212414D210655FD83EE397 /* Pods */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | AAA0C21F91982DEC28FF117D /* Pods.debug.xcconfig */, 90 | 319D11543FA76EB92B99189A /* Pods.release.xcconfig */, 91 | ); 92 | name = Pods; 93 | sourceTree = ""; 94 | }; 95 | 722AF1241BBE3F760016090A = { 96 | isa = PBXGroup; 97 | children = ( 98 | 722AF12F1BBE3F760016090A /* LJWZoomiingHeaderView */, 99 | 722AF1491BBE3F760016090A /* LJWZoomiingHeaderViewTests */, 100 | 722AF12E1BBE3F760016090A /* Products */, 101 | 29212414D210655FD83EE397 /* Pods */, 102 | ADA6C5F4FCB6416EC2643C36 /* Frameworks */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | 722AF12E1BBE3F760016090A /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 722AF12D1BBE3F760016090A /* LJWZoomiingHeaderView.app */, 110 | 722AF1461BBE3F760016090A /* LJWZoomiingHeaderViewTests.xctest */, 111 | ); 112 | name = Products; 113 | sourceTree = ""; 114 | }; 115 | 722AF12F1BBE3F760016090A /* LJWZoomiingHeaderView */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 722AF15F1BBE5C030016090A /* LJWZoomingHeader */, 119 | 722AF16E1BBE64F00016090A /* TestZoomingHeaderView.h */, 120 | 722AF16F1BBE64F00016090A /* TestZoomingHeaderView.m */, 121 | 722AF15D1BBE509E0016090A /* 7494e68agb7a98471e34f&690.jpg */, 122 | 722AF1341BBE3F760016090A /* AppDelegate.h */, 123 | 722AF1351BBE3F760016090A /* AppDelegate.m */, 124 | 722AF1371BBE3F760016090A /* ViewController.h */, 125 | 722AF1381BBE3F760016090A /* ViewController.m */, 126 | 722AF13A1BBE3F760016090A /* Main.storyboard */, 127 | 722AF13D1BBE3F760016090A /* Images.xcassets */, 128 | 722AF13F1BBE3F760016090A /* LaunchScreen.xib */, 129 | 722AF1301BBE3F760016090A /* Supporting Files */, 130 | ); 131 | path = LJWZoomiingHeaderView; 132 | sourceTree = ""; 133 | }; 134 | 722AF1301BBE3F760016090A /* Supporting Files */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 722AF1311BBE3F760016090A /* Info.plist */, 138 | 722AF1321BBE3F760016090A /* main.m */, 139 | ); 140 | name = "Supporting Files"; 141 | sourceTree = ""; 142 | }; 143 | 722AF1491BBE3F760016090A /* LJWZoomiingHeaderViewTests */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 722AF14C1BBE3F760016090A /* LJWZoomiingHeaderViewTests.m */, 147 | 722AF14A1BBE3F760016090A /* Supporting Files */, 148 | ); 149 | path = LJWZoomiingHeaderViewTests; 150 | sourceTree = ""; 151 | }; 152 | 722AF14A1BBE3F760016090A /* Supporting Files */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 722AF14B1BBE3F760016090A /* Info.plist */, 156 | ); 157 | name = "Supporting Files"; 158 | sourceTree = ""; 159 | }; 160 | 722AF15F1BBE5C030016090A /* LJWZoomingHeader */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 722AF1671BBE5C750016090A /* LJWZoomingHeaderViewProtocol.h */, 164 | 722AF1681BBE5C980016090A /* UIScrollView+LJWZoomingHeader.h */, 165 | 722AF1691BBE5C980016090A /* UIScrollView+LJWZoomingHeader.m */, 166 | 722AF16B1BBE604C0016090A /* LJWZoomingHeaderControl.h */, 167 | 722AF16C1BBE604C0016090A /* LJWZoomingHeaderControl.m */, 168 | 7233139A1BBFBD6300849364 /* UIView+BelongController.h */, 169 | 7233139B1BBFBD6300849364 /* UIView+BelongController.m */, 170 | 724D1A7D1BDE752D00344781 /* LJWZoomingHeaderDefine.h */, 171 | 724D1A7E1BDE752D00344781 /* LJWZoomingHeaderDefine.m */, 172 | ); 173 | path = LJWZoomingHeader; 174 | sourceTree = ""; 175 | }; 176 | ADA6C5F4FCB6416EC2643C36 /* Frameworks */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | ED458347D2EFE5021DB037D5 /* libPods.a */, 180 | ); 181 | name = Frameworks; 182 | sourceTree = ""; 183 | }; 184 | /* End PBXGroup section */ 185 | 186 | /* Begin PBXNativeTarget section */ 187 | 722AF12C1BBE3F760016090A /* LJWZoomiingHeaderView */ = { 188 | isa = PBXNativeTarget; 189 | buildConfigurationList = 722AF1501BBE3F760016090A /* Build configuration list for PBXNativeTarget "LJWZoomiingHeaderView" */; 190 | buildPhases = ( 191 | F878610CCAEF322D796C0AFA /* Check Pods Manifest.lock */, 192 | 722AF1291BBE3F760016090A /* Sources */, 193 | 722AF12A1BBE3F760016090A /* Frameworks */, 194 | 722AF12B1BBE3F760016090A /* Resources */, 195 | B168DEC41BC7F44B2002BE8B /* Copy Pods Resources */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | ); 201 | name = LJWZoomiingHeaderView; 202 | productName = LJWZoomiingHeaderView; 203 | productReference = 722AF12D1BBE3F760016090A /* LJWZoomiingHeaderView.app */; 204 | productType = "com.apple.product-type.application"; 205 | }; 206 | 722AF1451BBE3F760016090A /* LJWZoomiingHeaderViewTests */ = { 207 | isa = PBXNativeTarget; 208 | buildConfigurationList = 722AF1531BBE3F760016090A /* Build configuration list for PBXNativeTarget "LJWZoomiingHeaderViewTests" */; 209 | buildPhases = ( 210 | 722AF1421BBE3F760016090A /* Sources */, 211 | 722AF1431BBE3F760016090A /* Frameworks */, 212 | 722AF1441BBE3F760016090A /* Resources */, 213 | ); 214 | buildRules = ( 215 | ); 216 | dependencies = ( 217 | 722AF1481BBE3F760016090A /* PBXTargetDependency */, 218 | ); 219 | name = LJWZoomiingHeaderViewTests; 220 | productName = LJWZoomiingHeaderViewTests; 221 | productReference = 722AF1461BBE3F760016090A /* LJWZoomiingHeaderViewTests.xctest */; 222 | productType = "com.apple.product-type.bundle.unit-test"; 223 | }; 224 | /* End PBXNativeTarget section */ 225 | 226 | /* Begin PBXProject section */ 227 | 722AF1251BBE3F760016090A /* Project object */ = { 228 | isa = PBXProject; 229 | attributes = { 230 | LastUpgradeCheck = 0700; 231 | ORGANIZATIONNAME = ljw; 232 | TargetAttributes = { 233 | 722AF12C1BBE3F760016090A = { 234 | CreatedOnToolsVersion = 6.4; 235 | }; 236 | 722AF1451BBE3F760016090A = { 237 | CreatedOnToolsVersion = 6.4; 238 | TestTargetID = 722AF12C1BBE3F760016090A; 239 | }; 240 | }; 241 | }; 242 | buildConfigurationList = 722AF1281BBE3F760016090A /* Build configuration list for PBXProject "LJWZoomiingHeaderView" */; 243 | compatibilityVersion = "Xcode 3.2"; 244 | developmentRegion = English; 245 | hasScannedForEncodings = 0; 246 | knownRegions = ( 247 | en, 248 | Base, 249 | ); 250 | mainGroup = 722AF1241BBE3F760016090A; 251 | productRefGroup = 722AF12E1BBE3F760016090A /* Products */; 252 | projectDirPath = ""; 253 | projectRoot = ""; 254 | targets = ( 255 | 722AF12C1BBE3F760016090A /* LJWZoomiingHeaderView */, 256 | 722AF1451BBE3F760016090A /* LJWZoomiingHeaderViewTests */, 257 | ); 258 | }; 259 | /* End PBXProject section */ 260 | 261 | /* Begin PBXResourcesBuildPhase section */ 262 | 722AF12B1BBE3F760016090A /* Resources */ = { 263 | isa = PBXResourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | 722AF13C1BBE3F760016090A /* Main.storyboard in Resources */, 267 | 722AF15E1BBE509E0016090A /* 7494e68agb7a98471e34f&690.jpg in Resources */, 268 | 722AF1411BBE3F760016090A /* LaunchScreen.xib in Resources */, 269 | 722AF13E1BBE3F760016090A /* Images.xcassets in Resources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | 722AF1441BBE3F760016090A /* Resources */ = { 274 | isa = PBXResourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXResourcesBuildPhase section */ 281 | 282 | /* Begin PBXShellScriptBuildPhase section */ 283 | B168DEC41BC7F44B2002BE8B /* Copy Pods Resources */ = { 284 | isa = PBXShellScriptBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | ); 288 | inputPaths = ( 289 | ); 290 | name = "Copy Pods Resources"; 291 | outputPaths = ( 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | shellPath = /bin/sh; 295 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 296 | showEnvVarsInLog = 0; 297 | }; 298 | F878610CCAEF322D796C0AFA /* Check Pods Manifest.lock */ = { 299 | isa = PBXShellScriptBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | ); 303 | inputPaths = ( 304 | ); 305 | name = "Check Pods Manifest.lock"; 306 | outputPaths = ( 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | shellPath = /bin/sh; 310 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 311 | showEnvVarsInLog = 0; 312 | }; 313 | /* End PBXShellScriptBuildPhase section */ 314 | 315 | /* Begin PBXSourcesBuildPhase section */ 316 | 722AF1291BBE3F760016090A /* Sources */ = { 317 | isa = PBXSourcesBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | 724D1A7F1BDE752D00344781 /* LJWZoomingHeaderDefine.m in Sources */, 321 | 722AF16A1BBE5C980016090A /* UIScrollView+LJWZoomingHeader.m in Sources */, 322 | 722AF1701BBE64F00016090A /* TestZoomingHeaderView.m in Sources */, 323 | 7233139C1BBFBD6300849364 /* UIView+BelongController.m in Sources */, 324 | 722AF1391BBE3F760016090A /* ViewController.m in Sources */, 325 | 722AF16D1BBE604C0016090A /* LJWZoomingHeaderControl.m in Sources */, 326 | 722AF1361BBE3F760016090A /* AppDelegate.m in Sources */, 327 | 722AF1331BBE3F760016090A /* main.m in Sources */, 328 | ); 329 | runOnlyForDeploymentPostprocessing = 0; 330 | }; 331 | 722AF1421BBE3F760016090A /* Sources */ = { 332 | isa = PBXSourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | 722AF14D1BBE3F760016090A /* LJWZoomiingHeaderViewTests.m in Sources */, 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | }; 339 | /* End PBXSourcesBuildPhase section */ 340 | 341 | /* Begin PBXTargetDependency section */ 342 | 722AF1481BBE3F760016090A /* PBXTargetDependency */ = { 343 | isa = PBXTargetDependency; 344 | target = 722AF12C1BBE3F760016090A /* LJWZoomiingHeaderView */; 345 | targetProxy = 722AF1471BBE3F760016090A /* PBXContainerItemProxy */; 346 | }; 347 | /* End PBXTargetDependency section */ 348 | 349 | /* Begin PBXVariantGroup section */ 350 | 722AF13A1BBE3F760016090A /* Main.storyboard */ = { 351 | isa = PBXVariantGroup; 352 | children = ( 353 | 722AF13B1BBE3F760016090A /* Base */, 354 | ); 355 | name = Main.storyboard; 356 | sourceTree = ""; 357 | }; 358 | 722AF13F1BBE3F760016090A /* LaunchScreen.xib */ = { 359 | isa = PBXVariantGroup; 360 | children = ( 361 | 722AF1401BBE3F760016090A /* Base */, 362 | ); 363 | name = LaunchScreen.xib; 364 | sourceTree = ""; 365 | }; 366 | /* End PBXVariantGroup section */ 367 | 368 | /* Begin XCBuildConfiguration section */ 369 | 722AF14E1BBE3F760016090A /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 374 | CLANG_CXX_LIBRARY = "libc++"; 375 | CLANG_ENABLE_MODULES = YES; 376 | CLANG_ENABLE_OBJC_ARC = YES; 377 | CLANG_WARN_BOOL_CONVERSION = YES; 378 | CLANG_WARN_CONSTANT_CONVERSION = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INT_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_UNREACHABLE_CODE = YES; 385 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 386 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 387 | COPY_PHASE_STRIP = NO; 388 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | ENABLE_TESTABILITY = YES; 391 | GCC_C_LANGUAGE_STANDARD = gnu99; 392 | GCC_DYNAMIC_NO_PIC = NO; 393 | GCC_NO_COMMON_BLOCKS = YES; 394 | GCC_OPTIMIZATION_LEVEL = 0; 395 | GCC_PREPROCESSOR_DEFINITIONS = ( 396 | "DEBUG=1", 397 | "$(inherited)", 398 | ); 399 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 402 | GCC_WARN_UNDECLARED_SELECTOR = YES; 403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 404 | GCC_WARN_UNUSED_FUNCTION = YES; 405 | GCC_WARN_UNUSED_VARIABLE = YES; 406 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 407 | MTL_ENABLE_DEBUG_INFO = YES; 408 | ONLY_ACTIVE_ARCH = YES; 409 | SDKROOT = iphoneos; 410 | }; 411 | name = Debug; 412 | }; 413 | 722AF14F1BBE3F760016090A /* Release */ = { 414 | isa = XCBuildConfiguration; 415 | buildSettings = { 416 | ALWAYS_SEARCH_USER_PATHS = NO; 417 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 418 | CLANG_CXX_LIBRARY = "libc++"; 419 | CLANG_ENABLE_MODULES = YES; 420 | CLANG_ENABLE_OBJC_ARC = YES; 421 | CLANG_WARN_BOOL_CONVERSION = YES; 422 | CLANG_WARN_CONSTANT_CONVERSION = YES; 423 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 424 | CLANG_WARN_EMPTY_BODY = YES; 425 | CLANG_WARN_ENUM_CONVERSION = YES; 426 | CLANG_WARN_INT_CONVERSION = YES; 427 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 428 | CLANG_WARN_UNREACHABLE_CODE = YES; 429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 431 | COPY_PHASE_STRIP = NO; 432 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 433 | ENABLE_NS_ASSERTIONS = NO; 434 | ENABLE_STRICT_OBJC_MSGSEND = YES; 435 | GCC_C_LANGUAGE_STANDARD = gnu99; 436 | GCC_NO_COMMON_BLOCKS = YES; 437 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 438 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 439 | GCC_WARN_UNDECLARED_SELECTOR = YES; 440 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 441 | GCC_WARN_UNUSED_FUNCTION = YES; 442 | GCC_WARN_UNUSED_VARIABLE = YES; 443 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 444 | MTL_ENABLE_DEBUG_INFO = NO; 445 | SDKROOT = iphoneos; 446 | VALIDATE_PRODUCT = YES; 447 | }; 448 | name = Release; 449 | }; 450 | 722AF1511BBE3F760016090A /* Debug */ = { 451 | isa = XCBuildConfiguration; 452 | baseConfigurationReference = AAA0C21F91982DEC28FF117D /* Pods.debug.xcconfig */; 453 | buildSettings = { 454 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 455 | INFOPLIST_FILE = LJWZoomiingHeaderView/Info.plist; 456 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 457 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 458 | PRODUCT_BUNDLE_IDENTIFIER = com.gaodun.LJWZoomiingHeaderView; 459 | PRODUCT_NAME = "$(TARGET_NAME)"; 460 | }; 461 | name = Debug; 462 | }; 463 | 722AF1521BBE3F760016090A /* Release */ = { 464 | isa = XCBuildConfiguration; 465 | baseConfigurationReference = 319D11543FA76EB92B99189A /* Pods.release.xcconfig */; 466 | buildSettings = { 467 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 468 | INFOPLIST_FILE = LJWZoomiingHeaderView/Info.plist; 469 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 470 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 471 | PRODUCT_BUNDLE_IDENTIFIER = com.gaodun.LJWZoomiingHeaderView; 472 | PRODUCT_NAME = "$(TARGET_NAME)"; 473 | }; 474 | name = Release; 475 | }; 476 | 722AF1541BBE3F760016090A /* Debug */ = { 477 | isa = XCBuildConfiguration; 478 | buildSettings = { 479 | BUNDLE_LOADER = "$(TEST_HOST)"; 480 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 481 | GCC_PREPROCESSOR_DEFINITIONS = ( 482 | "DEBUG=1", 483 | "$(inherited)", 484 | ); 485 | INFOPLIST_FILE = LJWZoomiingHeaderViewTests/Info.plist; 486 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 487 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 488 | PRODUCT_BUNDLE_IDENTIFIER = "com.ljw.$(PRODUCT_NAME:rfc1034identifier)"; 489 | PRODUCT_NAME = "$(TARGET_NAME)"; 490 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LJWZoomiingHeaderView.app/LJWZoomiingHeaderView"; 491 | }; 492 | name = Debug; 493 | }; 494 | 722AF1551BBE3F760016090A /* Release */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | BUNDLE_LOADER = "$(TEST_HOST)"; 498 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 499 | INFOPLIST_FILE = LJWZoomiingHeaderViewTests/Info.plist; 500 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 501 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 502 | PRODUCT_BUNDLE_IDENTIFIER = "com.ljw.$(PRODUCT_NAME:rfc1034identifier)"; 503 | PRODUCT_NAME = "$(TARGET_NAME)"; 504 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LJWZoomiingHeaderView.app/LJWZoomiingHeaderView"; 505 | }; 506 | name = Release; 507 | }; 508 | /* End XCBuildConfiguration section */ 509 | 510 | /* Begin XCConfigurationList section */ 511 | 722AF1281BBE3F760016090A /* Build configuration list for PBXProject "LJWZoomiingHeaderView" */ = { 512 | isa = XCConfigurationList; 513 | buildConfigurations = ( 514 | 722AF14E1BBE3F760016090A /* Debug */, 515 | 722AF14F1BBE3F760016090A /* Release */, 516 | ); 517 | defaultConfigurationIsVisible = 0; 518 | defaultConfigurationName = Release; 519 | }; 520 | 722AF1501BBE3F760016090A /* Build configuration list for PBXNativeTarget "LJWZoomiingHeaderView" */ = { 521 | isa = XCConfigurationList; 522 | buildConfigurations = ( 523 | 722AF1511BBE3F760016090A /* Debug */, 524 | 722AF1521BBE3F760016090A /* Release */, 525 | ); 526 | defaultConfigurationIsVisible = 0; 527 | defaultConfigurationName = Release; 528 | }; 529 | 722AF1531BBE3F760016090A /* Build configuration list for PBXNativeTarget "LJWZoomiingHeaderViewTests" */ = { 530 | isa = XCConfigurationList; 531 | buildConfigurations = ( 532 | 722AF1541BBE3F760016090A /* Debug */, 533 | 722AF1551BBE3F760016090A /* Release */, 534 | ); 535 | defaultConfigurationIsVisible = 0; 536 | defaultConfigurationName = Release; 537 | }; 538 | /* End XCConfigurationList section */ 539 | }; 540 | rootObject = 722AF1251BBE3F760016090A /* Project object */; 541 | } 542 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/7494e68agb7a98471e34f&690.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinaljw/LJWZoomingHeader/02bedc05d7f6d8abb5508e2bbe292e323d8bb991/LJWZoomiingHeaderView/7494e68agb7a98471e34f&690.jpg -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/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 | 27 | 28 | 29 | 30 | 31 | 32 | 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 | 72 | 73 | 74 | 75 | 76 | 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 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinaljw/LJWZoomingHeader/02bedc05d7f6d8abb5508e2bbe292e323d8bb991/LJWZoomiingHeaderView/LJWZoomingHeader/.DS_Store -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/LJWZoomingHeaderControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // LJWZoomingHeaderControl.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "LJWZoomingHeaderViewProtocol.h" 12 | 13 | @interface LJWZoomingHeaderControl : NSObject 14 | 15 | @property (nonatomic, strong) UIView *zoomingHeaderView; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/LJWZoomingHeaderControl.m: -------------------------------------------------------------------------------- 1 | // 2 | // LJWZoomingHeaderControl.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "LJWZoomingHeaderControl.h" 10 | #import "UIView+BelongController.h" 11 | 12 | /** 默认header偏移变化速率 */ 13 | static CGFloat const DefaultFrameOffsetTrainsitionRate = 0.5f; 14 | 15 | @interface LJWZoomingHeaderControl () 16 | { 17 | //resetFrame的次数 18 | NSUInteger resetCount; 19 | } 20 | 21 | @end 22 | 23 | @implementation LJWZoomingHeaderControl 24 | 25 | #pragma mark - 26 | - (void)didOffsetChangedWithScrollViewScrollInfo:(UIScrollViewScrollInfo *)info 27 | { 28 | 29 | //是否固定,调整header层级 30 | if (IsStubbornAndHasStubbornInfo(self.zoomingHeaderView)) { 31 | StubbornInfo stbInfo = self.zoomingHeaderView.stubbornInfo; 32 | 33 | switch (stbInfo.hierarchy) { 34 | case HeaderViewHierarchyBackground: 35 | { 36 | [info.scrollingScrollView sendSubviewToBack:self.zoomingHeaderView]; 37 | } 38 | break; 39 | case HeaderViewHierarchyFront: 40 | { 41 | [info.scrollingScrollView bringSubviewToFront:self.zoomingHeaderView]; 42 | } 43 | break; 44 | default: 45 | break; 46 | } 47 | 48 | } 49 | 50 | [self resetHeightAndYWithInfo:info]; 51 | 52 | [self moveToHCenterWithInfo:info]; 53 | 54 | [self resetSubviewsWithScrollInfo:info]; 55 | 56 | //要放后面,不然会有惊喜~~~~ 57 | if ([self.zoomingHeaderView respondsToSelector:@selector(maxmumHeight)]) { 58 | CGFloat maxHeight = [self.zoomingHeaderView maxmumHeight]; 59 | maxHeight = maxHeight < 0.f ? 0.f : maxHeight; 60 | if (info.newContentOffset.y < - maxHeight) { 61 | info.scrollingScrollView.contentOffset = CGPointMake(0, -maxHeight); 62 | } 63 | return; 64 | } 65 | 66 | } 67 | 68 | - (void)resetHeightAndYWithInfo:(UIScrollViewScrollInfo *)info 69 | { 70 | 71 | //纯粹为了适配automaticallyAdjustsScrollViewInsets = YES的情况 72 | //然而,并没有什么卵用~ 73 | resetCount ++; 74 | if (info.scrollingScrollView.belongController.automaticallyAdjustsScrollViewInsets && 75 | resetCount == 3) 76 | { 77 | self.zoomingHeaderView.frame = self.zoomingHeaderView.originFrame; 78 | return; 79 | } 80 | 81 | CGRect frame = self.zoomingHeaderView.frame; 82 | 83 | CGFloat change = - (info.newContentOffset.y - info.oldContentOffset.y); 84 | 85 | //得到内容往下偏移量,并矫正 86 | CGFloat frameOffset = [self.zoomingHeaderView respondsToSelector:@selector(frameOffset)] ? self.zoomingHeaderView.frameOffset : 0.f; 87 | 88 | [self resetValue:&frameOffset withMaximum:self.zoomingHeaderView.originFrame.size.height minimum:0.f]; 89 | 90 | //如果很顽固弃用framOffset 91 | frameOffset = IsStubbornAndHasStubbornInfo(self.zoomingHeaderView) && !stubbornInfoIsEqualToDontStubborn(self.zoomingHeaderView.stubbornInfo) ? 0.f : frameOffset; 92 | 93 | //得到变幻速率,并矫正 94 | CGFloat frameOffsetTrainsitionRate = [self.zoomingHeaderView respondsToSelector:@selector(frameOffsetTrainsitionRate)] ? self.zoomingHeaderView.frameOffsetTrainsitionRate : DefaultFrameOffsetTrainsitionRate; 95 | 96 | [self resetValue:&frameOffsetTrainsitionRate withMaximum:1.f minimum:0.f]; 97 | 98 | //然而,并没有什么卵用~现在有卵用了~ 99 | if (frameOffset > 0.f && 100 | - info.scrollingScrollView.contentOffset.y < self.zoomingHeaderView.frame.size.height) 101 | { 102 | frame.size.height += change * frameOffsetTrainsitionRate; 103 | frame.size.width += change * frameOffsetTrainsitionRate; 104 | } 105 | else 106 | { 107 | frame.size.height += change; 108 | frame.size.width += change; 109 | } 110 | 111 | frame.origin.y -= change; 112 | 113 | CGFloat originHeight = self.zoomingHeaderView.originFrame.size.height; 114 | CGFloat originY = self.zoomingHeaderView.originFrame.origin.y; 115 | CGFloat originWidth = self.zoomingHeaderView.originFrame.size.width; 116 | 117 | StubbornInfo stubbornInfo = DontStubbornInfo; 118 | 119 | if (IsStubbornAndHasStubbornInfo(self.zoomingHeaderView)) { 120 | stubbornInfo = self.zoomingHeaderView.stubbornInfo; 121 | } 122 | 123 | //是否往上滑 124 | if (info.scrollDirection == UIScrollViewScrollDirectionToTop) 125 | { 126 | //如果固定配置信息不等于不固定且类型是往上滑时固定; 且需要固定了~ 127 | if (!stubbornInfoIsEqualToDontStubborn(stubbornInfo) && stubbornInfo.type == StubbornTypeUp && info.scrollingScrollView.contentOffset.y >= - (originHeight - stubbornInfo.y_up)) { 128 | CGRect stubbornFrame = self.zoomingHeaderView.frame; 129 | stubbornFrame.origin.y = info.scrollingScrollView.contentOffset.y - stubbornInfo.y_up; 130 | stubbornFrame.origin.x = 0.f; 131 | 132 | //修正size 133 | stubbornFrame.size.width = stubbornFrame.size.width > originWidth ? originWidth : stubbornFrame.size.width; 134 | stubbornFrame.size.height = stubbornFrame.size.height > originHeight ? originHeight : stubbornFrame.size.height; 135 | 136 | self.zoomingHeaderView.frame = stubbornFrame; 137 | return; 138 | } 139 | 140 | //如果算出来的大小比原始的大小小,则重置成原始的大小 141 | frame.origin.y = frame.origin.y > originY ? originY : frame.origin.y; 142 | frame.size.height = frame.size.height < originHeight ? originHeight : frame.size.height; 143 | frame.size.width = frame.size.width < originWidth ? originWidth : frame.size.width; 144 | } 145 | 146 | //如果固定配置信息不等于不固定且类型是往下滑时固定; 且需要固定了~ 147 | if (!stubbornInfoIsEqualToDontStubborn(stubbornInfo) && (stubbornInfo.type == StubbornTypeDown || stubbornInfo.type == StubbornTypeUpAndDown) && info.scrollingScrollView.contentOffset.y <= - (originHeight - stubbornInfo.y_down)) { 148 | 149 | CGRect stubbornFrame = self.zoomingHeaderView.frame; 150 | stubbornFrame.origin.y = info.scrollingScrollView.contentOffset.y; 151 | stubbornFrame.origin.x = 0.f; 152 | 153 | //修正size 154 | stubbornFrame.size.width = stubbornFrame.size.width > originWidth ? originWidth : stubbornFrame.size.width; 155 | stubbornFrame.size.height = stubbornFrame.size.height > originHeight ? originHeight : stubbornFrame.size.height; 156 | 157 | self.zoomingHeaderView.frame = stubbornFrame; 158 | // NSLog(@"down in %lf", stubbornFrame.origin.y); 159 | return; 160 | } 161 | 162 | //判断是否往下滑,且header是否不在屏幕中 163 | if (info.scrollDirection == UIScrollViewScrollDirectionToBottom && 164 | info.newContentOffset.y > originY) 165 | { 166 | 167 | frame.origin.y = frame.origin.y < originY ? originY : frame.origin.y; 168 | frame.size.height = frame.size.height > originHeight ? originHeight : frame.size.height; 169 | frame.size.width = frame.size.width > originWidth ? originWidth : frame.size.width; 170 | } 171 | 172 | //得到当前frame的偏移量,并矫正 173 | CGFloat currentOffset = frameOffset + (info.scrollingScrollView.contentOffset.y - originY) * frameOffsetTrainsitionRate; 174 | [self resetValue:¤tOffset withMaximum:frameOffset minimum:0.f]; 175 | 176 | //当Header没有完全消失时,修正frame 177 | if (info.scrollingScrollView.contentOffset.y != self.zoomingHeaderView.frame.origin.y + currentOffset && 178 | info.newContentOffset.y < originY && 179 | info.newContentOffset.y < 0) 180 | { 181 | frame.origin.y = info.scrollingScrollView.contentOffset.y; 182 | //#warning 稍等,哥哥要出去玩了,回来再搞,先这样了~ 183 | frame.size.height = -frame.origin.y + currentOffset; 184 | frame.size.width = frame.size.height / originHeight * originWidth; 185 | frame.origin.x = originWidth - frame.size.width; 186 | } 187 | 188 | self.zoomingHeaderView.frame = frame; 189 | 190 | info.scrollingScrollView.scrollIndicatorInsets = UIEdgeInsetsMake(frame.size.height - currentOffset, 0, 0, 0); 191 | 192 | } 193 | 194 | - (void)moveToHCenterWithInfo:(UIScrollViewScrollInfo *)info 195 | { 196 | CGPoint center = self.zoomingHeaderView.center; 197 | center.x = info.scrollingScrollView.frame.size.width / 2; 198 | self.zoomingHeaderView.center = center; 199 | } 200 | 201 | - (void)resetSubviewsWithScrollInfo:(UIScrollViewScrollInfo *)info 202 | { 203 | if ([self.zoomingHeaderView respondsToSelector:@selector(resetSubViewsFrameWithScrollInfo:)]) { 204 | [self.zoomingHeaderView resetSubViewsFrameWithScrollInfo:info]; 205 | } 206 | } 207 | 208 | #pragma mark - Helper 209 | - (void)resetValue:(CGFloat *)value withMaximum:(CGFloat)maximum minimum:(CGFloat)minimum 210 | { 211 | *value = *value > maximum ? maximum : *value; 212 | *value = *value < minimum ? minimum : *value; 213 | } 214 | 215 | @end 216 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/LJWZoomingHeaderDefine.h: -------------------------------------------------------------------------------- 1 | // 2 | // LJWZoomingHeaderDefine.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/26. 6 | // Copyright © 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //一些方便的宏 12 | #define CanPerformShouldStubborn(zoomingHeaderView) ([zoomingHeaderView respondsToSelector:@selector(isStubborn)]) 13 | #define CanPerformStubbornInfo(zoomingHeaderView) ([zoomingHeaderView respondsToSelector:@selector(stubbornInfo)]) 14 | #define IsStubborn(zoomingHeaderView) (CanPerformShouldStubborn(zoomingHeaderView) && zoomingHeaderView.isStubborn) 15 | #define IsStubbornAndHasStubbornInfo(zoomingHeaderView) (IsStubborn(zoomingHeaderView) && CanPerformStubbornInfo(zoomingHeaderView)) 16 | 17 | /** 18 | * 顽固的类型 19 | */ 20 | typedef NS_ENUM(NSInteger, StubbornType){ 21 | /** 22 | * 不顽固 23 | */ 24 | StubbornTypeDontStubborn = 0, 25 | /** 26 | * 向上滑时固定 27 | */ 28 | StubbornTypeUp = 1, 29 | /** 30 | * 向下滑时固定 31 | */ 32 | StubbornTypeDown = 2, 33 | /** 34 | * 向上向下都固定 35 | */ 36 | StubbornTypeUpAndDown = 3, 37 | }; 38 | 39 | /** 40 | * header的层级,在滚动时会默认把header至于对应位置 41 | */ 42 | typedef NS_ENUM(NSInteger, HeaderViewHierarchy){ 43 | /** 44 | * 在天上 45 | */ 46 | HeaderViewHierarchyInTheSky = 0, 47 | /** 48 | * 在scrollView的最前面 49 | */ 50 | HeaderViewHierarchyFront = 1, 51 | /** 52 | * 在scrollView的最后面 53 | */ 54 | HeaderViewHierarchyBackground = 2, 55 | }; 56 | 57 | /** 58 | * 顽固配置信息结构体 59 | */ 60 | struct StubbornInfo 61 | { 62 | /** 63 | * 向上固定的位置 64 | */ 65 | CGFloat y_up; 66 | /** 67 | * 向下固定的位置 68 | */ 69 | CGFloat y_down; 70 | /** 71 | * 固定的类型 72 | */ 73 | StubbornType type; 74 | /** 75 | * header的层级 76 | */ 77 | HeaderViewHierarchy hierarchy; 78 | }; 79 | 80 | /** 81 | * 不顽固配置信息 82 | */ 83 | extern const struct StubbornInfo DontStubbornInfo; 84 | 85 | /** 86 | * 比较函数 87 | * 88 | * @param info_1 顽固配置1 89 | * @param info_2 顽固配置2 90 | * 91 | * @return 结果 92 | */ 93 | extern BOOL compareStubbornInfoIsEqual(struct StubbornInfo info_1,struct StubbornInfo info_2); 94 | 95 | /** 96 | * 是否是不顽固配置 97 | * 98 | * @param info 顽固配置 99 | * 100 | * @return 结果 101 | */ 102 | extern BOOL stubbornInfoIsEqualToDontStubborn(struct StubbornInfo info); 103 | 104 | /** 105 | * 顽固的配置信息 106 | */ 107 | typedef struct StubbornInfo StubbornInfo; 108 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/LJWZoomingHeaderDefine.m: -------------------------------------------------------------------------------- 1 | // 2 | // LJWZoomingHeaderDefine.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/26. 6 | // Copyright © 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "LJWZoomingHeaderDefine.h" 10 | 11 | const struct StubbornInfo DontStubbornInfo = {0,0,StubbornTypeDontStubborn,HeaderViewHierarchyInTheSky}; 12 | 13 | BOOL compareStubbornInfoIsEqual(struct StubbornInfo info_1,struct StubbornInfo info_2) 14 | { 15 | return info_1.y_up == info_2.y_up && info_1.y_down == info_2.y_down && info_1.type == info_2.type && info_1.hierarchy == info_2.hierarchy; 16 | } 17 | 18 | BOOL stubbornInfoIsEqualToDontStubborn(struct StubbornInfo info) 19 | { 20 | return compareStubbornInfoIsEqual(info, DontStubbornInfo); 21 | } -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/LJWZoomingHeaderViewProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // LJWZoomingHeaderViewProtocol.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LJWZoomingHeaderDefine.h" 11 | 12 | @class UIScrollViewScrollInfo; 13 | 14 | /** 15 | * 不顽固配置信息 16 | */ 17 | extern const struct StubbornInfo DontStubbornInfo; 18 | 19 | /** 20 | * 比较函数 21 | * 22 | * @param info_1 顽固配置1 23 | * @param info_2 顽固配置2 24 | * 25 | * @return 结果 26 | */ 27 | extern BOOL compareStubbornInfoIsEqual(struct StubbornInfo info_1,struct StubbornInfo info_2); 28 | 29 | /** 30 | * 是否是不顽固配置 31 | * 32 | * @param info 顽固配置 33 | * 34 | * @return 结果 35 | */ 36 | extern BOOL stubbornInfoIsEqualToDontStubborn(struct StubbornInfo info); 37 | 38 | @protocol LJWZoomingHeaderViewProtocol 39 | 40 | /* 41 | 用来存放初始位置、大小,的属性,必须有,其实本来也可以不必须,懒得改了~ 42 | */ 43 | @property (nonatomic, assign) CGRect originFrame; 44 | 45 | @optional; 46 | /** 47 | 在这里设置子视图的frame让他们能跟着一块儿变大变小,粗粗细细,伸伸缩缩~ 48 | */ 49 | - (void)resetSubViewsFrameWithScrollInfo:(UIScrollViewScrollInfo *)info; 50 | 51 | /** 52 | 最大高度 53 | 这个也不要瞎搞,嗯,你搞了也没用😏 54 | */ 55 | - (CGFloat)maxmumHeight; 56 | 57 | /** 58 | header往下的偏移量(- -!其实是内容往上偏移的量,sorry),然而不是很完美。然而现在应该可以用了~。 59 | 请不要给大于originFrame.size.height的值,也不要给负值,虽然你给了还是没用😏 60 | */ 61 | - (CGFloat)frameOffset; 62 | 63 | /** 64 | 当frameOffset不为0时会起作用,用以控制header偏移的速率,即frameOffset趋近于0的速率。 65 | 不实现此代理会使用默认的速率0.5f; 66 | 请不要给大于1.f或小于0.f的值,给了也没用😏 67 | */ 68 | - (CGFloat)frameOffsetTrainsitionRate; 69 | 70 | /** 71 | * 是否需要固定 72 | * 73 | * @return 是否 74 | */ 75 | - (BOOL)isStubborn; 76 | 77 | /** 78 | * 要固定的配置信息 79 | * 80 | * @return 要固定的配置信息 81 | */ 82 | - (StubbornInfo)stubbornInfo; 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/UIScrollView+LJWZoomingHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView+LJWZoomingHeader.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LJWZoomingHeaderControl.h" 11 | #import "UIView+BelongController.h" 12 | #import "UIScrollView+ContentOffsetObserver.h" 13 | 14 | @interface UIScrollView (LJWZoomingHeader) 15 | 16 | @property (nonatomic, strong, readonly) UIView *zoomingHeaderView; 17 | 18 | - (void)addZoomingHeaderView:(UIView *)zoomingHeaderView; 19 | 20 | - (void)removeZoomingHeaderView; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/UIScrollView+LJWZoomingHeader.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView+LJWZoomingHeader.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "UIScrollView+LJWZoomingHeader.h" 10 | #import 11 | 12 | 13 | @interface UIScrollView () 14 | 15 | @property (nonatomic, strong) LJWZoomingHeaderControl *control; 16 | 17 | @property (nonatomic, strong) NSMutableSet *keypathsBeingObserved; 18 | 19 | @end 20 | 21 | @implementation UIScrollView (LJWZoomingHeader) 22 | 23 | #pragma mark - Setter & Getter 24 | - (void)setZoomingHeaderView:(UIView *)zoomingHeaderView 25 | { 26 | objc_setAssociatedObject(self, @selector(zoomingHeaderView), zoomingHeaderView, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 27 | } 28 | 29 | - (UIView *)zoomingHeaderView 30 | { 31 | return objc_getAssociatedObject(self, _cmd); 32 | } 33 | 34 | - (void)setControl:(LJWZoomingHeaderControl *)control 35 | { 36 | objc_setAssociatedObject(self, @selector(control), control, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 37 | } 38 | 39 | - (LJWZoomingHeaderControl *)control 40 | { 41 | return objc_getAssociatedObject(self, _cmd); 42 | } 43 | 44 | - (NSMutableArray *)keypathsBeingObserved 45 | { 46 | if (!objc_getAssociatedObject(self, _cmd)) { 47 | self.keypathsBeingObserved = [[NSMutableSet alloc] init]; 48 | } 49 | 50 | return objc_getAssociatedObject(self, _cmd); 51 | } 52 | 53 | - (void)setKeypathsBeingObserved:(NSMutableArray *)keypathsBeingObserved 54 | { 55 | objc_setAssociatedObject(self, @selector(keypathsBeingObserved), keypathsBeingObserved, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 56 | } 57 | 58 | #pragma mark - Control 59 | - (void)addZoomingHeaderView:(UIView *)zoomingHeaderView 60 | { 61 | 62 | [self.zoomingHeaderView removeFromSuperview]; 63 | 64 | self.zoomingHeaderView = zoomingHeaderView; 65 | 66 | [self addSubview:self.zoomingHeaderView]; 67 | 68 | [self sendSubviewToBack:self.zoomingHeaderView]; 69 | 70 | [self resetZoomingHeaderViewFrameAndSelfInset]; 71 | 72 | [self addControl]; 73 | 74 | } 75 | 76 | - (void)removeZoomingHeaderView 77 | { 78 | [self.zoomingHeaderView removeFromSuperview]; 79 | self.zoomingHeaderView = nil; 80 | 81 | UIEdgeInsets insets = self.contentInset; 82 | insets.top = 0.f; 83 | [self setContentInset:insets]; 84 | self.scrollIndicatorInsets = insets; 85 | 86 | [self.contentOffsetObserver removeDelegate:self.control]; 87 | } 88 | 89 | #pragma mark - Helper 90 | - (void)resetZoomingHeaderViewFrameAndSelfInset 91 | { 92 | [self resetZoomingHeaderViewFrame]; 93 | 94 | [self resetContentInset]; 95 | } 96 | 97 | - (void)resetZoomingHeaderViewFrame 98 | { 99 | CGFloat offset = [self.zoomingHeaderView respondsToSelector:@selector(frameOffset)] ? self.zoomingHeaderView.frameOffset : 0; 100 | 101 | //如果是个顽固的header那就忽略frameOffset 102 | if (IsStubbornAndHasStubbornInfo(self.zoomingHeaderView) && !stubbornInfoIsEqualToDontStubborn(self.zoomingHeaderView.stubbornInfo)) { 103 | offset = 0.f; 104 | } 105 | 106 | CGRect frame = self.zoomingHeaderView.frame; 107 | frame.origin.x = 0; 108 | frame.origin.y = - frame.size.height + offset; 109 | // frame.size.width = self.frame.size.width; 110 | self.zoomingHeaderView.frame = frame; 111 | self.zoomingHeaderView.originFrame = frame; 112 | } 113 | 114 | - (void)resetContentInset 115 | { 116 | CGFloat topInset = - self.zoomingHeaderView.originFrame.origin.y; 117 | 118 | //调整inset,然而并没有什么卵用。 119 | if (self.belongController.automaticallyAdjustsScrollViewInsets) { 120 | topInset -= 64.f; 121 | } 122 | 123 | UIEdgeInsets inset = self.contentInset; 124 | inset.top = topInset; 125 | self.contentInset = inset; 126 | 127 | self.scrollIndicatorInsets = self.contentInset; 128 | 129 | self.contentOffset = CGPointMake(self.contentOffset.x, -self.contentInset.top); 130 | } 131 | 132 | - (void)addControl 133 | { 134 | LJWZoomingHeaderControl *control = [[LJWZoomingHeaderControl alloc] init]; 135 | control.zoomingHeaderView = self.zoomingHeaderView; 136 | self.control = control; 137 | [self.contentOffsetObserver addDelegate:self.control]; 138 | } 139 | 140 | @end 141 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/UIView+BelongController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+BelongController.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/3. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (BelongController) 12 | 13 | - (UIViewController *)belongController; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/LJWZoomingHeader/UIView+BelongController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+BelongController.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/3. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "UIView+BelongController.h" 10 | 11 | @implementation UIView (BelongController) 12 | 13 | - (UIViewController *)belongController 14 | { 15 | if ([self.nextResponder isKindOfClass:[UIViewController class]]) { 16 | return (UIViewController *)self.nextResponder; 17 | } 18 | else 19 | { 20 | if ([self.nextResponder isKindOfClass:[UIWindow class]]) { 21 | return nil; 22 | } 23 | 24 | return [(UIView *)self.nextResponder belongController]; 25 | } 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/TestZoomingHeaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestZoomingHeaderView.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LJWZoomingHeaderViewProtocol.h" 11 | 12 | @interface TestZoomingHeaderView : UIView 13 | 14 | //用来存放初始位置、大小,的属性,必须有,其实本来也可以不必须,懒得改了~ 15 | @property (nonatomic, assign) CGRect originFrame; 16 | 17 | //随你怎么搞了~ 18 | @property (nonatomic, strong) UIView *centerView; 19 | 20 | @property (nonatomic, strong) UIImageView *imageView; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/TestZoomingHeaderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestZoomingHeaderView.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "TestZoomingHeaderView.h" 10 | 11 | @implementation TestZoomingHeaderView 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | [self addSubview:self.imageView]; 18 | [self addSubview:self.centerView]; 19 | [self resetSubViewsFrameWithScrollInfo:nil]; 20 | } 21 | return self; 22 | } 23 | 24 | - (void)dealloc 25 | { 26 | NSLog(@"dealloc %@", self); 27 | } 28 | 29 | #pragma mark - Setter & Getter 30 | - (UIView *)centerView 31 | { 32 | 33 | if (!_centerView) { 34 | 35 | _centerView = [[UIView alloc] initWithFrame:CGRectZero]; 36 | _centerView.backgroundColor = [UIColor grayColor]; 37 | 38 | } 39 | 40 | return _centerView; 41 | } 42 | 43 | - (UIImageView *)imageView 44 | { 45 | if (!_imageView) { 46 | _imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"7494e68agb7a98471e34f&690.jpg"]]; 47 | } 48 | return _imageView; 49 | } 50 | 51 | #pragma mark Protocol 这里都是可选的 52 | //在这里设置子视图的frame让他们能跟着一块儿变大变小,粗粗细细,伸伸缩缩~ 53 | - (void)resetSubViewsFrameWithScrollInfo:(UIScrollViewScrollInfo *)info 54 | { 55 | self.centerView.frame = CGRectMake(0, 0, self.frame.size.width / 3, self.frame.size.height / 3); 56 | self.centerView.center = CGPointMake(self.frame.size.width / 2, self.frame.size.height / 2); 57 | self.imageView.frame = self.bounds; 58 | } 59 | 60 | //header最大的高度 61 | - (CGFloat)maxmumHeight 62 | { 63 | return 450.f; 64 | } 65 | 66 | //header往下的偏移量,然而不是很完美,然而现在应该可以用了~。 67 | - (CGFloat)frameOffset 68 | { 69 | return 50.f; 70 | } 71 | 72 | - (CGFloat)frameOffsetTrainsitionRate 73 | { 74 | return 0.5f; 75 | } 76 | 77 | /** 78 | * 是否需要固定 79 | * 80 | * @return 是否 81 | */ 82 | - (BOOL)isStubborn 83 | { 84 | return YES; 85 | } 86 | 87 | /** 88 | * 要固定的配置信息 89 | * 90 | * @return 要固定的配置信息 91 | */ 92 | - (StubbornInfo)stubbornInfo 93 | { 94 | StubbornInfo info = {250.f,150.f, StubbornTypeUp, HeaderViewHierarchyFront}; 95 | return info; 96 | } 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIScrollView+LJWZoomingHeader.h" 11 | #import "TestZoomingHeaderView.h" 12 | 13 | @interface ViewController () 14 | 15 | @property (nonatomic, strong) UIScrollView *scrollView; 16 | 17 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 18 | 19 | @end 20 | 21 | @implementation ViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | // Do any additional setup after loading the view, typically from a nib. 26 | 27 | //墙裂建议把这个设成NO 28 | self.automaticallyAdjustsScrollViewInsets = NO; 29 | 30 | [self testTableView]; 31 | 32 | // [self testScrollView]; 33 | 34 | // [self.tableView removeZoomingHeaderView]; 35 | 36 | 37 | 38 | } 39 | 40 | - (void)didReceiveMemoryWarning { 41 | [super didReceiveMemoryWarning]; 42 | // Dispose of any resources that can be recreated. 43 | } 44 | 45 | #pragma mark - Setter & Getter 46 | - (UIScrollView *)scrollView 47 | { 48 | if (!_scrollView) { 49 | 50 | CGRect bounds = self.view.bounds; 51 | bounds.origin.y += 64.f; 52 | 53 | _scrollView = [[UIScrollView alloc] initWithFrame:bounds]; 54 | _scrollView.backgroundColor = [UIColor blueColor]; 55 | 56 | } 57 | return _scrollView; 58 | } 59 | 60 | #pragma mark - Test 61 | - (TestZoomingHeaderView *)testHeaderView 62 | { 63 | //给出合适的高宽,乱来的话我也不知道会怎样~ 64 | TestZoomingHeaderView *headerView = [[TestZoomingHeaderView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 300.f)]; 65 | headerView.backgroundColor = [UIColor orangeColor]; 66 | 67 | return headerView; 68 | } 69 | 70 | - (void)testScrollView 71 | { 72 | [self.view addSubview:self.scrollView]; 73 | self.view.backgroundColor = [UIColor grayColor]; 74 | [self.scrollView addZoomingHeaderView:[self testHeaderView]]; 75 | self.scrollView.contentSize = CGSizeMake(0, 1000.f); 76 | } 77 | 78 | - (void)testTableView 79 | { 80 | self.tableView.delegate = self; 81 | self.tableView.dataSource = self; 82 | 83 | UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; 84 | headerView.backgroundColor = [UIColor orangeColor]; 85 | 86 | self.tableView.tableHeaderView = headerView; 87 | 88 | [self.tableView addZoomingHeaderView:[self testHeaderView]]; 89 | } 90 | 91 | #pragma mark - UITableViewDataSource 92 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 93 | { 94 | return 100; 95 | } 96 | 97 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 98 | { 99 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"testcell" forIndexPath:indexPath]; 100 | cell.textLabel.text = @(indexPath.row).description; 101 | 102 | return cell; 103 | } 104 | 105 | #pragma mark - UIScrollViewDelegate 106 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 107 | { 108 | NSLog(@"%lf", scrollView.contentOffset.y); 109 | } 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderViewTests/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LJWZoomiingHeaderViewTests/LJWZoomiingHeaderViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LJWZoomiingHeaderViewTests.m 3 | // LJWZoomiingHeaderViewTests 4 | // 5 | // Created by ljw on 15/10/2. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LJWZoomiingHeaderViewTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation LJWZoomiingHeaderViewTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | pod 'XJJScrollViewObserver', '~> 1.0.0' 2 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - XJJScrollViewObserver (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - XJJScrollViewObserver (~> 1.0.0) 6 | 7 | SPEC CHECKSUMS: 8 | XJJScrollViewObserver: 917195c5e2ec1f825f67db18ca54cb62696e42ce 9 | 10 | COCOAPODS: 0.37.2 11 | -------------------------------------------------------------------------------- /Pods/Headers/Private/XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.h: -------------------------------------------------------------------------------- 1 | ../../../XJJScrollViewObserver/XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.h -------------------------------------------------------------------------------- /Pods/Headers/Private/XJJScrollViewObserver/UIScrollViewContentOffsetObserver.h: -------------------------------------------------------------------------------- 1 | ../../../XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewContentOffsetObserver.h -------------------------------------------------------------------------------- /Pods/Headers/Private/XJJScrollViewObserver/UIScrollViewScrollInfo.h: -------------------------------------------------------------------------------- 1 | ../../../XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewScrollInfo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.h: -------------------------------------------------------------------------------- 1 | ../../../XJJScrollViewObserver/XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.h -------------------------------------------------------------------------------- /Pods/Headers/Public/XJJScrollViewObserver/UIScrollViewContentOffsetObserver.h: -------------------------------------------------------------------------------- 1 | ../../../XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewContentOffsetObserver.h -------------------------------------------------------------------------------- /Pods/Headers/Public/XJJScrollViewObserver/UIScrollViewScrollInfo.h: -------------------------------------------------------------------------------- 1 | ../../../XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewScrollInfo.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - XJJScrollViewObserver (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - XJJScrollViewObserver (~> 1.0.0) 6 | 7 | SPEC CHECKSUMS: 8 | XJJScrollViewObserver: 917195c5e2ec1f825f67db18ca54cb62696e42ce 9 | 10 | COCOAPODS: 0.37.2 11 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 013C525C9A010F743C9581AC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C393FDCBC293BBB5AFA831 /* Foundation.framework */; }; 11 | 031F543D25975CCECEBF3381 /* UIScrollViewContentOffsetObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 588B09F5602105EEC2658AD3 /* UIScrollViewContentOffsetObserver.m */; }; 12 | 33DB7261BBB79EBABE0EC4B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C393FDCBC293BBB5AFA831 /* Foundation.framework */; }; 13 | 3D521F1ECC48CD6B6AD64D18 /* UIScrollViewScrollInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = C222399FB236A88515E11311 /* UIScrollViewScrollInfo.m */; }; 14 | 4B81F42A158DE0323F2E2234 /* UIScrollViewScrollInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 09225F7F380E63B29E502871 /* UIScrollViewScrollInfo.h */; }; 15 | 4DA9ABA4EB01FDE4A960A835 /* UIScrollView+ContentOffsetObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 97A9E42E3DDF25FBCDB1AF82 /* UIScrollView+ContentOffsetObserver.h */; }; 16 | 5129BB4C8A14A210569D52C0 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA63E1272E1C1253F055B7D /* Pods-dummy.m */; }; 17 | 987544A18C6E7AEA3C86CBF7 /* UIScrollView+ContentOffsetObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CD61E375EC67E77A9B1F749 /* UIScrollView+ContentOffsetObserver.m */; }; 18 | BA397E6A7B31BEC105E653A3 /* UIScrollViewContentOffsetObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 319A383F3C32B3B8F03D1F03 /* UIScrollViewContentOffsetObserver.h */; }; 19 | F879951D90ECFECF174AFDDE /* Pods-XJJScrollViewObserver-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D379C38E07113BC562D8ACF3 /* Pods-XJJScrollViewObserver-dummy.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | F73E7E12A95A11EA4AFC48AA /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = BA48EF093CA86BA4E63E0390 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = CBBA434D68DB21EB17E4317B; 28 | remoteInfo = "Pods-XJJScrollViewObserver"; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 09225F7F380E63B29E502871 /* UIScrollViewScrollInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = UIScrollViewScrollInfo.h; path = XJJScrollViewObserver/UIScrollViewScrollInfo.h; sourceTree = ""; }; 34 | 0D93AF6A921794EB2AA7CC8D /* libPods-XJJScrollViewObserver.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-XJJScrollViewObserver.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 319A383F3C32B3B8F03D1F03 /* UIScrollViewContentOffsetObserver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = UIScrollViewContentOffsetObserver.h; path = XJJScrollViewObserver/UIScrollViewContentOffsetObserver.h; sourceTree = ""; }; 36 | 57FECCA077D7ECFE57AC4C70 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; 37 | 588B09F5602105EEC2658AD3 /* UIScrollViewContentOffsetObserver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = UIScrollViewContentOffsetObserver.m; path = XJJScrollViewObserver/UIScrollViewContentOffsetObserver.m; sourceTree = ""; }; 38 | 5933C6CF081EE3E818B0357C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; 39 | 62018F2370E1E06295B188A1 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 68ADEB42D4FCB7341499B77E /* Pods-XJJScrollViewObserver-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-XJJScrollViewObserver-prefix.pch"; sourceTree = ""; }; 41 | 8BA63E1272E1C1253F055B7D /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; 42 | 8CD61E375EC67E77A9B1F749 /* UIScrollView+ContentOffsetObserver.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+ContentOffsetObserver.m"; path = "XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.m"; sourceTree = ""; }; 43 | 97A9E42E3DDF25FBCDB1AF82 /* UIScrollView+ContentOffsetObserver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+ContentOffsetObserver.h"; path = "XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.h"; sourceTree = ""; }; 44 | A1ECF3CA7924DF38EA16BACF /* Pods-environment.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-environment.h"; sourceTree = ""; }; 45 | AA4D185E8AEFC9C2A6B0F76E /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; 46 | B6C393FDCBC293BBB5AFA831 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 47 | C222399FB236A88515E11311 /* UIScrollViewScrollInfo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = UIScrollViewScrollInfo.m; path = XJJScrollViewObserver/UIScrollViewScrollInfo.m; sourceTree = ""; }; 48 | D379C38E07113BC562D8ACF3 /* Pods-XJJScrollViewObserver-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-XJJScrollViewObserver-dummy.m"; sourceTree = ""; }; 49 | D3C85A3D57DB33D8443C8EB3 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; 50 | D734F6F5547C6CE8A2E96219 /* Pods-XJJScrollViewObserver.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XJJScrollViewObserver.xcconfig"; sourceTree = ""; }; 51 | D9908E788E00299945F3524B /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 52 | E83EDD527B245B58C8B3129B /* Pods-XJJScrollViewObserver-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XJJScrollViewObserver-Private.xcconfig"; sourceTree = ""; }; 53 | F4CE7951AA915BF9776E3847 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 6ACA954E0B04102E8058B19A /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 33DB7261BBB79EBABE0EC4B5 /* Foundation.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | D1D1D55A7FC6D3AC65CEDEBA /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 013C525C9A010F743C9581AC /* Foundation.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 0BEA3335FE6201561AFE2169 /* Frameworks */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | D6412E45A60A28332253E686 /* iOS */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 11917F88348F7B452CA74B07 /* Pods */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | AA4D185E8AEFC9C2A6B0F76E /* Pods-acknowledgements.markdown */, 88 | D3C85A3D57DB33D8443C8EB3 /* Pods-acknowledgements.plist */, 89 | 8BA63E1272E1C1253F055B7D /* Pods-dummy.m */, 90 | A1ECF3CA7924DF38EA16BACF /* Pods-environment.h */, 91 | 57FECCA077D7ECFE57AC4C70 /* Pods-resources.sh */, 92 | F4CE7951AA915BF9776E3847 /* Pods.debug.xcconfig */, 93 | 5933C6CF081EE3E818B0357C /* Pods.release.xcconfig */, 94 | ); 95 | name = Pods; 96 | path = "Target Support Files/Pods"; 97 | sourceTree = ""; 98 | }; 99 | 33850A8CA0704D22770434BE = { 100 | isa = PBXGroup; 101 | children = ( 102 | D9908E788E00299945F3524B /* Podfile */, 103 | 0BEA3335FE6201561AFE2169 /* Frameworks */, 104 | F22B3675393CF7740DB682A4 /* Pods */, 105 | 778DB8F6592114FCE4182AA3 /* Products */, 106 | A94AC4B57A320E5EB4A0C76B /* Targets Support Files */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 778DB8F6592114FCE4182AA3 /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 62018F2370E1E06295B188A1 /* libPods.a */, 114 | 0D93AF6A921794EB2AA7CC8D /* libPods-XJJScrollViewObserver.a */, 115 | ); 116 | name = Products; 117 | sourceTree = ""; 118 | }; 119 | A94AC4B57A320E5EB4A0C76B /* Targets Support Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 11917F88348F7B452CA74B07 /* Pods */, 123 | ); 124 | name = "Targets Support Files"; 125 | sourceTree = ""; 126 | }; 127 | B983BCAEF3B38E6A6BBA2CDB /* Support Files */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | D734F6F5547C6CE8A2E96219 /* Pods-XJJScrollViewObserver.xcconfig */, 131 | E83EDD527B245B58C8B3129B /* Pods-XJJScrollViewObserver-Private.xcconfig */, 132 | D379C38E07113BC562D8ACF3 /* Pods-XJJScrollViewObserver-dummy.m */, 133 | 68ADEB42D4FCB7341499B77E /* Pods-XJJScrollViewObserver-prefix.pch */, 134 | ); 135 | name = "Support Files"; 136 | path = "../Target Support Files/Pods-XJJScrollViewObserver"; 137 | sourceTree = ""; 138 | }; 139 | D6412E45A60A28332253E686 /* iOS */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | B6C393FDCBC293BBB5AFA831 /* Foundation.framework */, 143 | ); 144 | name = iOS; 145 | sourceTree = ""; 146 | }; 147 | E50A0EA62CFF8EB573DEB0D3 /* XJJScrollViewObserver */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 97A9E42E3DDF25FBCDB1AF82 /* UIScrollView+ContentOffsetObserver.h */, 151 | 8CD61E375EC67E77A9B1F749 /* UIScrollView+ContentOffsetObserver.m */, 152 | 319A383F3C32B3B8F03D1F03 /* UIScrollViewContentOffsetObserver.h */, 153 | 588B09F5602105EEC2658AD3 /* UIScrollViewContentOffsetObserver.m */, 154 | 09225F7F380E63B29E502871 /* UIScrollViewScrollInfo.h */, 155 | C222399FB236A88515E11311 /* UIScrollViewScrollInfo.m */, 156 | B983BCAEF3B38E6A6BBA2CDB /* Support Files */, 157 | ); 158 | path = XJJScrollViewObserver; 159 | sourceTree = ""; 160 | }; 161 | F22B3675393CF7740DB682A4 /* Pods */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | E50A0EA62CFF8EB573DEB0D3 /* XJJScrollViewObserver */, 165 | ); 166 | name = Pods; 167 | sourceTree = ""; 168 | }; 169 | /* End PBXGroup section */ 170 | 171 | /* Begin PBXHeadersBuildPhase section */ 172 | B80CA2EA2492DCBC43F75F25 /* Headers */ = { 173 | isa = PBXHeadersBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 4DA9ABA4EB01FDE4A960A835 /* UIScrollView+ContentOffsetObserver.h in Headers */, 177 | BA397E6A7B31BEC105E653A3 /* UIScrollViewContentOffsetObserver.h in Headers */, 178 | 4B81F42A158DE0323F2E2234 /* UIScrollViewScrollInfo.h in Headers */, 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | /* End PBXHeadersBuildPhase section */ 183 | 184 | /* Begin PBXNativeTarget section */ 185 | CBBA434D68DB21EB17E4317B /* Pods-XJJScrollViewObserver */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 998BEFE23861E442B04562EE /* Build configuration list for PBXNativeTarget "Pods-XJJScrollViewObserver" */; 188 | buildPhases = ( 189 | 8640DBCA0C046AF2A625B17B /* Sources */, 190 | 6ACA954E0B04102E8058B19A /* Frameworks */, 191 | B80CA2EA2492DCBC43F75F25 /* Headers */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | ); 197 | name = "Pods-XJJScrollViewObserver"; 198 | productName = "Pods-XJJScrollViewObserver"; 199 | productReference = 0D93AF6A921794EB2AA7CC8D /* libPods-XJJScrollViewObserver.a */; 200 | productType = "com.apple.product-type.library.static"; 201 | }; 202 | D37968004D331146F66ADC81 /* Pods */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = 9A4B9C1F2E076686FC858351 /* Build configuration list for PBXNativeTarget "Pods" */; 205 | buildPhases = ( 206 | 1E39D1A1A6AC09331231846C /* Sources */, 207 | D1D1D55A7FC6D3AC65CEDEBA /* Frameworks */, 208 | ); 209 | buildRules = ( 210 | ); 211 | dependencies = ( 212 | CD781C965ECD8FCC8FCF2259 /* PBXTargetDependency */, 213 | ); 214 | name = Pods; 215 | productName = Pods; 216 | productReference = 62018F2370E1E06295B188A1 /* libPods.a */; 217 | productType = "com.apple.product-type.library.static"; 218 | }; 219 | /* End PBXNativeTarget section */ 220 | 221 | /* Begin PBXProject section */ 222 | BA48EF093CA86BA4E63E0390 /* Project object */ = { 223 | isa = PBXProject; 224 | attributes = { 225 | LastUpgradeCheck = 0640; 226 | }; 227 | buildConfigurationList = 8237B59A32BD243B9715D402 /* Build configuration list for PBXProject "Pods" */; 228 | compatibilityVersion = "Xcode 3.2"; 229 | developmentRegion = English; 230 | hasScannedForEncodings = 0; 231 | knownRegions = ( 232 | en, 233 | ); 234 | mainGroup = 33850A8CA0704D22770434BE; 235 | productRefGroup = 778DB8F6592114FCE4182AA3 /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | D37968004D331146F66ADC81 /* Pods */, 240 | CBBA434D68DB21EB17E4317B /* Pods-XJJScrollViewObserver */, 241 | ); 242 | }; 243 | /* End PBXProject section */ 244 | 245 | /* Begin PBXSourcesBuildPhase section */ 246 | 1E39D1A1A6AC09331231846C /* Sources */ = { 247 | isa = PBXSourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | 5129BB4C8A14A210569D52C0 /* Pods-dummy.m in Sources */, 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | 8640DBCA0C046AF2A625B17B /* Sources */ = { 255 | isa = PBXSourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | F879951D90ECFECF174AFDDE /* Pods-XJJScrollViewObserver-dummy.m in Sources */, 259 | 987544A18C6E7AEA3C86CBF7 /* UIScrollView+ContentOffsetObserver.m in Sources */, 260 | 031F543D25975CCECEBF3381 /* UIScrollViewContentOffsetObserver.m in Sources */, 261 | 3D521F1ECC48CD6B6AD64D18 /* UIScrollViewScrollInfo.m in Sources */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | /* End PBXSourcesBuildPhase section */ 266 | 267 | /* Begin PBXTargetDependency section */ 268 | CD781C965ECD8FCC8FCF2259 /* PBXTargetDependency */ = { 269 | isa = PBXTargetDependency; 270 | name = "Pods-XJJScrollViewObserver"; 271 | target = CBBA434D68DB21EB17E4317B /* Pods-XJJScrollViewObserver */; 272 | targetProxy = F73E7E12A95A11EA4AFC48AA /* PBXContainerItemProxy */; 273 | }; 274 | /* End PBXTargetDependency section */ 275 | 276 | /* Begin XCBuildConfiguration section */ 277 | 0D6443AE86DA48B5DCD22684 /* Release */ = { 278 | isa = XCBuildConfiguration; 279 | buildSettings = { 280 | ALWAYS_SEARCH_USER_PATHS = NO; 281 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 282 | CLANG_CXX_LIBRARY = "libc++"; 283 | CLANG_ENABLE_MODULES = YES; 284 | CLANG_ENABLE_OBJC_ARC = YES; 285 | CLANG_WARN_BOOL_CONVERSION = YES; 286 | CLANG_WARN_CONSTANT_CONVERSION = YES; 287 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 288 | CLANG_WARN_EMPTY_BODY = YES; 289 | CLANG_WARN_ENUM_CONVERSION = YES; 290 | CLANG_WARN_INT_CONVERSION = YES; 291 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 292 | CLANG_WARN_UNREACHABLE_CODE = YES; 293 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 294 | COPY_PHASE_STRIP = YES; 295 | ENABLE_NS_ASSERTIONS = NO; 296 | GCC_C_LANGUAGE_STANDARD = gnu99; 297 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 299 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 300 | GCC_WARN_UNDECLARED_SELECTOR = YES; 301 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 302 | GCC_WARN_UNUSED_FUNCTION = YES; 303 | GCC_WARN_UNUSED_VARIABLE = YES; 304 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 305 | STRIP_INSTALLED_PRODUCT = NO; 306 | SYMROOT = "${SRCROOT}/../build"; 307 | VALIDATE_PRODUCT = YES; 308 | }; 309 | name = Release; 310 | }; 311 | 1A8AF9AD2948F8C1604208A1 /* Release */ = { 312 | isa = XCBuildConfiguration; 313 | baseConfigurationReference = E83EDD527B245B58C8B3129B /* Pods-XJJScrollViewObserver-Private.xcconfig */; 314 | buildSettings = { 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | GCC_PREFIX_HEADER = "Target Support Files/Pods-XJJScrollViewObserver/Pods-XJJScrollViewObserver-prefix.pch"; 317 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 318 | MTL_ENABLE_DEBUG_INFO = NO; 319 | OTHER_LDFLAGS = ""; 320 | OTHER_LIBTOOLFLAGS = ""; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | SDKROOT = iphoneos; 323 | SKIP_INSTALL = YES; 324 | }; 325 | name = Release; 326 | }; 327 | 540F195FCB94EE95B94517EF /* Debug */ = { 328 | isa = XCBuildConfiguration; 329 | baseConfigurationReference = F4CE7951AA915BF9776E3847 /* Pods.debug.xcconfig */; 330 | buildSettings = { 331 | ENABLE_STRICT_OBJC_MSGSEND = YES; 332 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 333 | MTL_ENABLE_DEBUG_INFO = YES; 334 | OTHER_LDFLAGS = ""; 335 | OTHER_LIBTOOLFLAGS = ""; 336 | PODS_ROOT = "$(SRCROOT)"; 337 | PRODUCT_NAME = "$(TARGET_NAME)"; 338 | SDKROOT = iphoneos; 339 | SKIP_INSTALL = YES; 340 | }; 341 | name = Debug; 342 | }; 343 | 77C885247A73F32C42BCDC9A /* Debug */ = { 344 | isa = XCBuildConfiguration; 345 | buildSettings = { 346 | ALWAYS_SEARCH_USER_PATHS = NO; 347 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 348 | CLANG_CXX_LIBRARY = "libc++"; 349 | CLANG_ENABLE_MODULES = YES; 350 | CLANG_ENABLE_OBJC_ARC = YES; 351 | CLANG_WARN_BOOL_CONVERSION = YES; 352 | CLANG_WARN_CONSTANT_CONVERSION = YES; 353 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 354 | CLANG_WARN_EMPTY_BODY = YES; 355 | CLANG_WARN_ENUM_CONVERSION = YES; 356 | CLANG_WARN_INT_CONVERSION = YES; 357 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | COPY_PHASE_STRIP = NO; 361 | GCC_C_LANGUAGE_STANDARD = gnu99; 362 | GCC_DYNAMIC_NO_PIC = NO; 363 | GCC_OPTIMIZATION_LEVEL = 0; 364 | GCC_PREPROCESSOR_DEFINITIONS = ( 365 | "DEBUG=1", 366 | "$(inherited)", 367 | ); 368 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 370 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 371 | GCC_WARN_UNDECLARED_SELECTOR = YES; 372 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 373 | GCC_WARN_UNUSED_FUNCTION = YES; 374 | GCC_WARN_UNUSED_VARIABLE = YES; 375 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 376 | ONLY_ACTIVE_ARCH = YES; 377 | STRIP_INSTALLED_PRODUCT = NO; 378 | SYMROOT = "${SRCROOT}/../build"; 379 | }; 380 | name = Debug; 381 | }; 382 | 86A747437BDFD86A0746CE44 /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | baseConfigurationReference = E83EDD527B245B58C8B3129B /* Pods-XJJScrollViewObserver-Private.xcconfig */; 385 | buildSettings = { 386 | ENABLE_STRICT_OBJC_MSGSEND = YES; 387 | GCC_PREFIX_HEADER = "Target Support Files/Pods-XJJScrollViewObserver/Pods-XJJScrollViewObserver-prefix.pch"; 388 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 389 | MTL_ENABLE_DEBUG_INFO = YES; 390 | OTHER_LDFLAGS = ""; 391 | OTHER_LIBTOOLFLAGS = ""; 392 | PRODUCT_NAME = "$(TARGET_NAME)"; 393 | SDKROOT = iphoneos; 394 | SKIP_INSTALL = YES; 395 | }; 396 | name = Debug; 397 | }; 398 | A4779213D8361D524261DDF0 /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | baseConfigurationReference = 5933C6CF081EE3E818B0357C /* Pods.release.xcconfig */; 401 | buildSettings = { 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 404 | MTL_ENABLE_DEBUG_INFO = NO; 405 | OTHER_LDFLAGS = ""; 406 | OTHER_LIBTOOLFLAGS = ""; 407 | PODS_ROOT = "$(SRCROOT)"; 408 | PRODUCT_NAME = "$(TARGET_NAME)"; 409 | SDKROOT = iphoneos; 410 | SKIP_INSTALL = YES; 411 | }; 412 | name = Release; 413 | }; 414 | /* End XCBuildConfiguration section */ 415 | 416 | /* Begin XCConfigurationList section */ 417 | 8237B59A32BD243B9715D402 /* Build configuration list for PBXProject "Pods" */ = { 418 | isa = XCConfigurationList; 419 | buildConfigurations = ( 420 | 77C885247A73F32C42BCDC9A /* Debug */, 421 | 0D6443AE86DA48B5DCD22684 /* Release */, 422 | ); 423 | defaultConfigurationIsVisible = 0; 424 | defaultConfigurationName = Release; 425 | }; 426 | 998BEFE23861E442B04562EE /* Build configuration list for PBXNativeTarget "Pods-XJJScrollViewObserver" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | 86A747437BDFD86A0746CE44 /* Debug */, 430 | 1A8AF9AD2948F8C1604208A1 /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | 9A4B9C1F2E076686FC858351 /* Build configuration list for PBXNativeTarget "Pods" */ = { 436 | isa = XCConfigurationList; 437 | buildConfigurations = ( 438 | 540F195FCB94EE95B94517EF /* Debug */, 439 | A4779213D8361D524261DDF0 /* Release */, 440 | ); 441 | defaultConfigurationIsVisible = 0; 442 | defaultConfigurationName = Release; 443 | }; 444 | /* End XCConfigurationList section */ 445 | }; 446 | rootObject = BA48EF093CA86BA4E63E0390 /* Project object */; 447 | } 448 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XJJScrollViewObserver/Pods-XJJScrollViewObserver-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-XJJScrollViewObserver.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/XJJScrollViewObserver" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/XJJScrollViewObserver" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XJJScrollViewObserver/Pods-XJJScrollViewObserver-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XJJScrollViewObserver : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XJJScrollViewObserver 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XJJScrollViewObserver/Pods-XJJScrollViewObserver-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-XJJScrollViewObserver/Pods-XJJScrollViewObserver.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chinaljw/LJWZoomingHeader/02bedc05d7f6d8abb5508e2bbe292e323d8bb991/Pods/Target Support Files/Pods-XJJScrollViewObserver/Pods-XJJScrollViewObserver.xcconfig -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## XJJScrollViewObserver 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015 可以用中文嘛 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | Generated by CocoaPods - http://cocoapods.org 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2015 可以用中文嘛 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | 40 | Title 41 | XJJScrollViewObserver 42 | Type 43 | PSGroupSpecifier 44 | 45 | 46 | FooterText 47 | Generated by CocoaPods - http://cocoapods.org 48 | Title 49 | 50 | Type 51 | PSGroupSpecifier 52 | 53 | 54 | StringsTable 55 | Acknowledgements 56 | Title 57 | Acknowledgements 58 | 59 | 60 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // XJJScrollViewObserver 10 | #define COCOAPODS_POD_AVAILABLE_XJJScrollViewObserver 11 | #define COCOAPODS_VERSION_MAJOR_XJJScrollViewObserver 1 12 | #define COCOAPODS_VERSION_MINOR_XJJScrollViewObserver 0 13 | #define COCOAPODS_VERSION_PATCH_XJJScrollViewObserver 0 14 | 15 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY=$(cd "${1%/*}" && pwd) 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | if [[ "${ACTION}" == "install" ]]; then 63 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 64 | fi 65 | rm -f "$RESOURCES_TO_COPY" 66 | 67 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 68 | then 69 | case "${TARGETED_DEVICE_FAMILY}" in 70 | 1,2) 71 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 72 | ;; 73 | 1) 74 | TARGET_DEVICE_ARGS="--target-device iphone" 75 | ;; 76 | 2) 77 | TARGET_DEVICE_ARGS="--target-device ipad" 78 | ;; 79 | *) 80 | TARGET_DEVICE_ARGS="--target-device mac" 81 | ;; 82 | esac 83 | 84 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 85 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 86 | while read line; do 87 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 88 | XCASSET_FILES+=("$line") 89 | fi 90 | done <<<"$OTHER_XCASSETS" 91 | 92 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 93 | fi 94 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/XJJScrollViewObserver" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/XJJScrollViewObserver" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Pods-XJJScrollViewObserver" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/XJJScrollViewObserver" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/XJJScrollViewObserver" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Pods-XJJScrollViewObserver" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 可以用中文嘛 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 | 23 | -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/README.md: -------------------------------------------------------------------------------- 1 | # XJJScrollViewObserver 2 | 提供scrollView滚动时的信息 3 | -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollVIew+ContentOffsetObserver.h 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by GaoDun on 15/10/12. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIScrollViewContentOffsetObserver.h" 11 | 12 | /* 13 | 直接scrollView.contentOffsetObserver就能用了 14 | */ 15 | 16 | @interface UIScrollView (ContentOffsetObserver) 17 | 18 | @property (nonatomic, strong, readonly) UIScrollViewContentOffsetObserver *contentOffsetObserver; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/XJJScrollViewObserver/UIScrollView+ContentOffsetObserver.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollVIew+ContentOffsetObserver.m 3 | // LJWZoomiingHeaderView 4 | // 5 | // Created by GaoDun on 15/10/12. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "UIScrollView+ContentOffsetObserver.h" 10 | #import 11 | 12 | @implementation UIScrollView (ContentOffsetObserver) 13 | 14 | #pragma mark - MethodSwizzling 15 | + (void)load 16 | { 17 | 18 | static dispatch_once_t onceToken; 19 | dispatch_once(&onceToken, ^{ 20 | 21 | SEL deallocOriginSEL = NSSelectorFromString(@"dealloc"); 22 | SEL deallocNewSEL = @selector(xjj_scrollViewObserver_dealloc); 23 | [self swizzlOriginSEL:deallocOriginSEL newSEL:deallocNewSEL]; 24 | 25 | }); 26 | 27 | } 28 | 29 | - (void)xjj_scrollViewObserver_dealloc 30 | { 31 | 32 | self.contentOffsetObserver = nil; 33 | 34 | [self xjj_scrollViewObserver_dealloc]; 35 | } 36 | 37 | + (void)swizzlOriginSEL:(SEL)originSEL newSEL:(SEL)newSEL 38 | { 39 | Method originMethod = class_getInstanceMethod(self.class, originSEL); 40 | Method newMethod = class_getInstanceMethod(self.class, newSEL); 41 | 42 | if (class_addMethod(self.class, originSEL, method_getImplementation(newMethod), method_getTypeEncoding(originMethod))) { 43 | class_replaceMethod(self.class, newSEL, method_getImplementation(originMethod), method_getTypeEncoding(originMethod)); 44 | } 45 | else 46 | { 47 | method_exchangeImplementations(originMethod, newMethod); 48 | } 49 | } 50 | 51 | #pragma mark - Setter & Getter 52 | - (void)setContentOffsetObserver:(UIScrollViewContentOffsetObserver *)contentOffsetObserver 53 | { 54 | if (objc_getAssociatedObject(self, @selector(contentOffsetObserver))) { 55 | [self removeObserver:self.contentOffsetObserver forKeyPath:ContentOffsetKeyPath]; 56 | } 57 | 58 | if (contentOffsetObserver) { 59 | [self addObserver:contentOffsetObserver forKeyPath:ContentOffsetKeyPath options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew context:nil]; 60 | } 61 | 62 | objc_setAssociatedObject(self, @selector(contentOffsetObserver), contentOffsetObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 63 | } 64 | 65 | - (UIScrollViewContentOffsetObserver *)contentOffsetObserver 66 | { 67 | 68 | if (!objc_getAssociatedObject(self, _cmd)) { 69 | self.contentOffsetObserver = [[UIScrollViewContentOffsetObserver alloc] init]; 70 | } 71 | 72 | return objc_getAssociatedObject(self, _cmd); 73 | } 74 | 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewContentOffsetObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollViewContentOffsetObserver.h 3 | // LJWScrollViewFloatingView 4 | // 5 | // Created by GaoDun on 15/8/28. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIScrollViewScrollInfo.h" 11 | 12 | static NSString *const ContentOffsetKeyPath = @"contentOffset"; 13 | 14 | @class UIScrollViewContentOffsetObserver; 15 | @protocol UIScrollViewContentOffsetObserverDelegate 16 | 17 | - (void)didOffsetChangedWithScrollViewScrollInfo:(UIScrollViewScrollInfo *)info; 18 | 19 | @end 20 | 21 | @interface UIScrollViewContentOffsetObserver : NSObject 22 | 23 | @property (nonatomic, weak) id delegate; 24 | 25 | @property (nonatomic, strong) NSMutableArray *delegates; 26 | 27 | - (void)addDelegate:(id)delegate; 28 | 29 | - (void)removeDelegate:(id)delegate; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewContentOffsetObserver.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollViewContentOffsetObserver.m 3 | // LJWScrollViewFloatingView 4 | // 5 | // Created by GaoDun on 15/8/28. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "UIScrollViewContentOffsetObserver.h" 10 | 11 | @implementation UIScrollViewContentOffsetObserver 12 | 13 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 14 | { 15 | if ([keyPath isEqualToString:ContentOffsetKeyPath]) { 16 | 17 | // NSLog(@"change == %@ \n object == %@", change, object); 18 | 19 | UIScrollViewScrollInfo *info = [[UIScrollViewScrollInfo alloc] initWithChanage:change scrollingScrollView:object target:self.delegate]; 20 | 21 | [self.delegate didOffsetChangedWithScrollViewScrollInfo:info]; 22 | 23 | for (id delegate in self.delegates) { 24 | [delegate didOffsetChangedWithScrollViewScrollInfo:info]; 25 | } 26 | 27 | } 28 | } 29 | 30 | #pragma mark - Setter & Getter 31 | - (NSMutableArray *)delegates 32 | { 33 | if (!_delegates) { 34 | _delegates = [[NSMutableArray alloc] init]; 35 | } 36 | return _delegates; 37 | } 38 | 39 | #pragma mark - Control 40 | - (void)addDelegate:(id)delegate 41 | { 42 | [self.delegates addObject:delegate]; 43 | } 44 | 45 | - (void)removeDelegate:(id)delegate 46 | { 47 | [self.delegates removeObject:delegate]; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewScrollInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollViewScrollInfo.h 3 | // LJWScrollViewFloatingView 4 | // 5 | // Created by GaoDun on 15/8/28. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | typedef NS_ENUM(NSInteger, UIScrollViewScrollDirection) 13 | { 14 | UIScrollViewScrollDirectionToTop = 1, 15 | UIScrollViewScrollDirectionToBottom = 2, 16 | UIScrollViewScrollDirectionToLeft = 3, 17 | UIScrollViewScrollDirectionToRight = 4, 18 | UIScrollViewScrollDirectionNone = 0, 19 | }; 20 | 21 | @protocol UIScrollViewContentOffsetObserverDelegate; 22 | 23 | @interface UIScrollViewScrollInfo : NSObject 24 | 25 | /** 正在滚动的scrollview,即被观察的scrollview */ 26 | @property (nonatomic, strong) UIScrollView *scrollingScrollView; 27 | 28 | /** 滚动方向 */ 29 | @property (nonatomic, assign) UIScrollViewScrollDirection scrollDirection; 30 | 31 | /** 新的offset */ 32 | @property (nonatomic, assign) CGPoint newContentOffset; 33 | 34 | /** 旧的offset */ 35 | @property (nonatomic, assign) CGPoint oldContentOffset; 36 | 37 | /** 滚动距离 */ 38 | @property (nonatomic, assign) CGPoint contentOffsetSection; 39 | 40 | /** 目标对象,即scrollViewObserver的代理 */ 41 | @property (nonatomic, weak) id target; 42 | 43 | /** 便捷初始化方法 */ 44 | - (instancetype)initWithChanage:(NSDictionary *)change 45 | scrollingScrollView:(UIScrollView *)scrollingScrollView 46 | target:(id)target; 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/XJJScrollViewObserver/XJJScrollViewObserver/UIScrollViewScrollInfo.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollViewScrollInfo.m 3 | // LJWScrollViewFloatingView 4 | // 5 | // Created by GaoDun on 15/8/28. 6 | // Copyright (c) 2015年 ljw. All rights reserved. 7 | // 8 | 9 | #import "UIScrollViewScrollInfo.h" 10 | 11 | @implementation UIScrollViewScrollInfo 12 | 13 | - (instancetype)initWithChanage:(NSDictionary *)change 14 | scrollingScrollView:(UIScrollView *)scrollingScrollView 15 | target:(id)target 16 | { 17 | self = [self init]; 18 | 19 | if (self) { 20 | 21 | self.scrollingScrollView = scrollingScrollView; 22 | self.target = target; 23 | 24 | self.oldContentOffset = [change[NSKeyValueChangeOldKey] CGPointValue]; 25 | self.newContentOffset = [change[NSKeyValueChangeNewKey] CGPointValue]; 26 | 27 | if (self.oldContentOffset.x > self.newContentOffset.x) { 28 | self.scrollDirection = UIScrollViewScrollDirectionToLeft; 29 | } 30 | if (self.oldContentOffset.x < self.newContentOffset.x) { 31 | self.scrollDirection = UIScrollViewScrollDirectionToRight; 32 | } 33 | if (self.oldContentOffset.y > self.newContentOffset.y) { 34 | self.scrollDirection = UIScrollViewScrollDirectionToBottom; 35 | } 36 | if (self.oldContentOffset.y < self.newContentOffset.y) { 37 | self.scrollDirection = UIScrollViewScrollDirectionToTop; 38 | } 39 | 40 | self.contentOffsetSection = CGPointMake(fabs(self.newContentOffset.x - self.oldContentOffset.x), fabs(self.newContentOffset.y - self.oldContentOffset.y)); 41 | 42 | } 43 | 44 | return self; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LJWZoomingHeader 2 | 能伸能缩,能粗能细的Header ~~~ 3 | 4 | # 效果图 5 | ![Alt Text](https://github.com/chinaljw/MyFileRepository/blob/master/Gif/LJWZoomiingHeaderGif.gif) 6 | 7 | ![Alt Text](https://github.com/chinaljw/MyFileRepository/blob/master/Gif/LJWZoomiingHeaderViewVideoGif-2.gif) 8 | 9 | # 墙裂建议 10 | 把Viewcontroller的此属性设成NO 11 | 12 | self.automaticallyAdjustsScrollViewInsets = NO; 13 | 14 | #CocoaPods 15 | pod 'LJWZoomingHeader' 16 | --------------------------------------------------------------------------------