├── .gitignore ├── FJSWaveProgressView.gif ├── FJSWaveProgressView.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── FJSWaveProgressView ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── FJSWaveProgress.h ├── FJSWaveProgress.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── FJSWaveProgressViewTests ├── FJSWaveProgressViewTests.m └── Info.plist ├── FJSWaveProgressViewUITests ├── FJSWaveProgressViewUITests.m └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /FJSWaveProgressView.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BestJoker/FJSWaveProgressView/a0d84eb0f01f5431a2539d7d23e473879a2ab6f3/FJSWaveProgressView.gif -------------------------------------------------------------------------------- /FJSWaveProgressView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D21F9CA31D23C9CF00851ED4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D21F9CA21D23C9CF00851ED4 /* main.m */; }; 11 | D21F9CA61D23C9CF00851ED4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D21F9CA51D23C9CF00851ED4 /* AppDelegate.m */; }; 12 | D21F9CAC1D23C9CF00851ED4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D21F9CAA1D23C9CF00851ED4 /* Main.storyboard */; }; 13 | D21F9CAE1D23C9CF00851ED4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D21F9CAD1D23C9CF00851ED4 /* Assets.xcassets */; }; 14 | D21F9CB11D23C9CF00851ED4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D21F9CAF1D23C9CF00851ED4 /* LaunchScreen.storyboard */; }; 15 | D21F9CBC1D23C9CF00851ED4 /* FJSWaveProgressViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D21F9CBB1D23C9CF00851ED4 /* FJSWaveProgressViewTests.m */; }; 16 | D21F9CC71D23C9CF00851ED4 /* FJSWaveProgressViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = D21F9CC61D23C9CF00851ED4 /* FJSWaveProgressViewUITests.m */; }; 17 | D21F9CD81D23C9E400851ED4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D21F9CD51D23C9E400851ED4 /* ViewController.m */; }; 18 | D21F9CD91D23C9E400851ED4 /* FJSWaveProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = D21F9CD71D23C9E400851ED4 /* FJSWaveProgress.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | D21F9CB81D23C9CF00851ED4 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = D21F9C961D23C9CF00851ED4 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = D21F9C9D1D23C9CF00851ED4; 27 | remoteInfo = FJSWaveProgressView; 28 | }; 29 | D21F9CC31D23C9CF00851ED4 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = D21F9C961D23C9CF00851ED4 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = D21F9C9D1D23C9CF00851ED4; 34 | remoteInfo = FJSWaveProgressView; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | D21F9C9E1D23C9CF00851ED4 /* FJSWaveProgressView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FJSWaveProgressView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | D21F9CA21D23C9CF00851ED4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 41 | D21F9CA41D23C9CF00851ED4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 42 | D21F9CA51D23C9CF00851ED4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 43 | D21F9CAB1D23C9CF00851ED4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 44 | D21F9CAD1D23C9CF00851ED4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 45 | D21F9CB01D23C9CF00851ED4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 46 | D21F9CB21D23C9CF00851ED4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | D21F9CB71D23C9CF00851ED4 /* FJSWaveProgressViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FJSWaveProgressViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | D21F9CBB1D23C9CF00851ED4 /* FJSWaveProgressViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FJSWaveProgressViewTests.m; sourceTree = ""; }; 49 | D21F9CBD1D23C9CF00851ED4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | D21F9CC21D23C9CF00851ED4 /* FJSWaveProgressViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FJSWaveProgressViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | D21F9CC61D23C9CF00851ED4 /* FJSWaveProgressViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FJSWaveProgressViewUITests.m; sourceTree = ""; }; 52 | D21F9CC81D23C9CF00851ED4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | D21F9CD41D23C9E400851ED4 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 54 | D21F9CD51D23C9E400851ED4 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 55 | D21F9CD61D23C9E400851ED4 /* FJSWaveProgress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FJSWaveProgress.h; sourceTree = ""; }; 56 | D21F9CD71D23C9E400851ED4 /* FJSWaveProgress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FJSWaveProgress.m; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | D21F9C9B1D23C9CF00851ED4 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | D21F9CB41D23C9CF00851ED4 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | D21F9CBF1D23C9CF00851ED4 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | D21F9C951D23C9CF00851ED4 = { 85 | isa = PBXGroup; 86 | children = ( 87 | D21F9CA01D23C9CF00851ED4 /* FJSWaveProgressView */, 88 | D21F9CBA1D23C9CF00851ED4 /* FJSWaveProgressViewTests */, 89 | D21F9CC51D23C9CF00851ED4 /* FJSWaveProgressViewUITests */, 90 | D21F9C9F1D23C9CF00851ED4 /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | D21F9C9F1D23C9CF00851ED4 /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | D21F9C9E1D23C9CF00851ED4 /* FJSWaveProgressView.app */, 98 | D21F9CB71D23C9CF00851ED4 /* FJSWaveProgressViewTests.xctest */, 99 | D21F9CC21D23C9CF00851ED4 /* FJSWaveProgressViewUITests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | D21F9CA01D23C9CF00851ED4 /* FJSWaveProgressView */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | D21F9CA41D23C9CF00851ED4 /* AppDelegate.h */, 108 | D21F9CA51D23C9CF00851ED4 /* AppDelegate.m */, 109 | D21F9CD41D23C9E400851ED4 /* ViewController.h */, 110 | D21F9CD51D23C9E400851ED4 /* ViewController.m */, 111 | D21F9CD61D23C9E400851ED4 /* FJSWaveProgress.h */, 112 | D21F9CD71D23C9E400851ED4 /* FJSWaveProgress.m */, 113 | D21F9CAA1D23C9CF00851ED4 /* Main.storyboard */, 114 | D21F9CAD1D23C9CF00851ED4 /* Assets.xcassets */, 115 | D21F9CAF1D23C9CF00851ED4 /* LaunchScreen.storyboard */, 116 | D21F9CB21D23C9CF00851ED4 /* Info.plist */, 117 | D21F9CA11D23C9CF00851ED4 /* Supporting Files */, 118 | ); 119 | path = FJSWaveProgressView; 120 | sourceTree = ""; 121 | }; 122 | D21F9CA11D23C9CF00851ED4 /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | D21F9CA21D23C9CF00851ED4 /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | D21F9CBA1D23C9CF00851ED4 /* FJSWaveProgressViewTests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | D21F9CBB1D23C9CF00851ED4 /* FJSWaveProgressViewTests.m */, 134 | D21F9CBD1D23C9CF00851ED4 /* Info.plist */, 135 | ); 136 | path = FJSWaveProgressViewTests; 137 | sourceTree = ""; 138 | }; 139 | D21F9CC51D23C9CF00851ED4 /* FJSWaveProgressViewUITests */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | D21F9CC61D23C9CF00851ED4 /* FJSWaveProgressViewUITests.m */, 143 | D21F9CC81D23C9CF00851ED4 /* Info.plist */, 144 | ); 145 | path = FJSWaveProgressViewUITests; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | D21F9C9D1D23C9CF00851ED4 /* FJSWaveProgressView */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = D21F9CCB1D23C9CF00851ED4 /* Build configuration list for PBXNativeTarget "FJSWaveProgressView" */; 154 | buildPhases = ( 155 | D21F9C9A1D23C9CF00851ED4 /* Sources */, 156 | D21F9C9B1D23C9CF00851ED4 /* Frameworks */, 157 | D21F9C9C1D23C9CF00851ED4 /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = FJSWaveProgressView; 164 | productName = FJSWaveProgressView; 165 | productReference = D21F9C9E1D23C9CF00851ED4 /* FJSWaveProgressView.app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | D21F9CB61D23C9CF00851ED4 /* FJSWaveProgressViewTests */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = D21F9CCE1D23C9CF00851ED4 /* Build configuration list for PBXNativeTarget "FJSWaveProgressViewTests" */; 171 | buildPhases = ( 172 | D21F9CB31D23C9CF00851ED4 /* Sources */, 173 | D21F9CB41D23C9CF00851ED4 /* Frameworks */, 174 | D21F9CB51D23C9CF00851ED4 /* Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | D21F9CB91D23C9CF00851ED4 /* PBXTargetDependency */, 180 | ); 181 | name = FJSWaveProgressViewTests; 182 | productName = FJSWaveProgressViewTests; 183 | productReference = D21F9CB71D23C9CF00851ED4 /* FJSWaveProgressViewTests.xctest */; 184 | productType = "com.apple.product-type.bundle.unit-test"; 185 | }; 186 | D21F9CC11D23C9CF00851ED4 /* FJSWaveProgressViewUITests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = D21F9CD11D23C9CF00851ED4 /* Build configuration list for PBXNativeTarget "FJSWaveProgressViewUITests" */; 189 | buildPhases = ( 190 | D21F9CBE1D23C9CF00851ED4 /* Sources */, 191 | D21F9CBF1D23C9CF00851ED4 /* Frameworks */, 192 | D21F9CC01D23C9CF00851ED4 /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | D21F9CC41D23C9CF00851ED4 /* PBXTargetDependency */, 198 | ); 199 | name = FJSWaveProgressViewUITests; 200 | productName = FJSWaveProgressViewUITests; 201 | productReference = D21F9CC21D23C9CF00851ED4 /* FJSWaveProgressViewUITests.xctest */; 202 | productType = "com.apple.product-type.bundle.ui-testing"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | D21F9C961D23C9CF00851ED4 /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastUpgradeCheck = 0730; 211 | ORGANIZATIONNAME = www.fujinshi.com; 212 | TargetAttributes = { 213 | D21F9C9D1D23C9CF00851ED4 = { 214 | CreatedOnToolsVersion = 7.3.1; 215 | }; 216 | D21F9CB61D23C9CF00851ED4 = { 217 | CreatedOnToolsVersion = 7.3.1; 218 | TestTargetID = D21F9C9D1D23C9CF00851ED4; 219 | }; 220 | D21F9CC11D23C9CF00851ED4 = { 221 | CreatedOnToolsVersion = 7.3.1; 222 | TestTargetID = D21F9C9D1D23C9CF00851ED4; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = D21F9C991D23C9CF00851ED4 /* Build configuration list for PBXProject "FJSWaveProgressView" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = English; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = D21F9C951D23C9CF00851ED4; 235 | productRefGroup = D21F9C9F1D23C9CF00851ED4 /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | D21F9C9D1D23C9CF00851ED4 /* FJSWaveProgressView */, 240 | D21F9CB61D23C9CF00851ED4 /* FJSWaveProgressViewTests */, 241 | D21F9CC11D23C9CF00851ED4 /* FJSWaveProgressViewUITests */, 242 | ); 243 | }; 244 | /* End PBXProject section */ 245 | 246 | /* Begin PBXResourcesBuildPhase section */ 247 | D21F9C9C1D23C9CF00851ED4 /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | D21F9CB11D23C9CF00851ED4 /* LaunchScreen.storyboard in Resources */, 252 | D21F9CAE1D23C9CF00851ED4 /* Assets.xcassets in Resources */, 253 | D21F9CAC1D23C9CF00851ED4 /* Main.storyboard in Resources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | D21F9CB51D23C9CF00851ED4 /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | D21F9CC01D23C9CF00851ED4 /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXResourcesBuildPhase section */ 272 | 273 | /* Begin PBXSourcesBuildPhase section */ 274 | D21F9C9A1D23C9CF00851ED4 /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | D21F9CD81D23C9E400851ED4 /* ViewController.m in Sources */, 279 | D21F9CA61D23C9CF00851ED4 /* AppDelegate.m in Sources */, 280 | D21F9CA31D23C9CF00851ED4 /* main.m in Sources */, 281 | D21F9CD91D23C9E400851ED4 /* FJSWaveProgress.m in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | D21F9CB31D23C9CF00851ED4 /* Sources */ = { 286 | isa = PBXSourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | D21F9CBC1D23C9CF00851ED4 /* FJSWaveProgressViewTests.m in Sources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | D21F9CBE1D23C9CF00851ED4 /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | D21F9CC71D23C9CF00851ED4 /* FJSWaveProgressViewUITests.m in Sources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | /* End PBXSourcesBuildPhase section */ 302 | 303 | /* Begin PBXTargetDependency section */ 304 | D21F9CB91D23C9CF00851ED4 /* PBXTargetDependency */ = { 305 | isa = PBXTargetDependency; 306 | target = D21F9C9D1D23C9CF00851ED4 /* FJSWaveProgressView */; 307 | targetProxy = D21F9CB81D23C9CF00851ED4 /* PBXContainerItemProxy */; 308 | }; 309 | D21F9CC41D23C9CF00851ED4 /* PBXTargetDependency */ = { 310 | isa = PBXTargetDependency; 311 | target = D21F9C9D1D23C9CF00851ED4 /* FJSWaveProgressView */; 312 | targetProxy = D21F9CC31D23C9CF00851ED4 /* PBXContainerItemProxy */; 313 | }; 314 | /* End PBXTargetDependency section */ 315 | 316 | /* Begin PBXVariantGroup section */ 317 | D21F9CAA1D23C9CF00851ED4 /* Main.storyboard */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | D21F9CAB1D23C9CF00851ED4 /* Base */, 321 | ); 322 | name = Main.storyboard; 323 | sourceTree = ""; 324 | }; 325 | D21F9CAF1D23C9CF00851ED4 /* LaunchScreen.storyboard */ = { 326 | isa = PBXVariantGroup; 327 | children = ( 328 | D21F9CB01D23C9CF00851ED4 /* Base */, 329 | ); 330 | name = LaunchScreen.storyboard; 331 | sourceTree = ""; 332 | }; 333 | /* End PBXVariantGroup section */ 334 | 335 | /* Begin XCBuildConfiguration section */ 336 | D21F9CC91D23C9CF00851ED4 /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_ANALYZER_NONNULL = YES; 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 342 | CLANG_CXX_LIBRARY = "libc++"; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_WARN_BOOL_CONVERSION = YES; 346 | CLANG_WARN_CONSTANT_CONVERSION = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 352 | CLANG_WARN_UNREACHABLE_CODE = YES; 353 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 355 | COPY_PHASE_STRIP = NO; 356 | DEBUG_INFORMATION_FORMAT = dwarf; 357 | ENABLE_STRICT_OBJC_MSGSEND = YES; 358 | ENABLE_TESTABILITY = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_DYNAMIC_NO_PIC = NO; 361 | GCC_NO_COMMON_BLOCKS = YES; 362 | GCC_OPTIMIZATION_LEVEL = 0; 363 | GCC_PREPROCESSOR_DEFINITIONS = ( 364 | "DEBUG=1", 365 | "$(inherited)", 366 | ); 367 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 368 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 369 | GCC_WARN_UNDECLARED_SELECTOR = YES; 370 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 371 | GCC_WARN_UNUSED_FUNCTION = YES; 372 | GCC_WARN_UNUSED_VARIABLE = YES; 373 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 374 | MTL_ENABLE_DEBUG_INFO = YES; 375 | ONLY_ACTIVE_ARCH = YES; 376 | SDKROOT = iphoneos; 377 | }; 378 | name = Debug; 379 | }; 380 | D21F9CCA1D23C9CF00851ED4 /* Release */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ALWAYS_SEARCH_USER_PATHS = NO; 384 | CLANG_ANALYZER_NONNULL = YES; 385 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 386 | CLANG_CXX_LIBRARY = "libc++"; 387 | CLANG_ENABLE_MODULES = YES; 388 | CLANG_ENABLE_OBJC_ARC = YES; 389 | CLANG_WARN_BOOL_CONVERSION = YES; 390 | CLANG_WARN_CONSTANT_CONVERSION = YES; 391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 392 | CLANG_WARN_EMPTY_BODY = YES; 393 | CLANG_WARN_ENUM_CONVERSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_UNREACHABLE_CODE = YES; 397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 399 | COPY_PHASE_STRIP = NO; 400 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 401 | ENABLE_NS_ASSERTIONS = NO; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | GCC_C_LANGUAGE_STANDARD = gnu99; 404 | GCC_NO_COMMON_BLOCKS = YES; 405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 406 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 407 | GCC_WARN_UNDECLARED_SELECTOR = YES; 408 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 409 | GCC_WARN_UNUSED_FUNCTION = YES; 410 | GCC_WARN_UNUSED_VARIABLE = YES; 411 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 412 | MTL_ENABLE_DEBUG_INFO = NO; 413 | SDKROOT = iphoneos; 414 | VALIDATE_PRODUCT = YES; 415 | }; 416 | name = Release; 417 | }; 418 | D21F9CCC1D23C9CF00851ED4 /* Debug */ = { 419 | isa = XCBuildConfiguration; 420 | buildSettings = { 421 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 422 | INFOPLIST_FILE = FJSWaveProgressView/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 424 | PRODUCT_BUNDLE_IDENTIFIER = com.biquu.FJSWaveProgressView; 425 | PRODUCT_NAME = "$(TARGET_NAME)"; 426 | }; 427 | name = Debug; 428 | }; 429 | D21F9CCD1D23C9CF00851ED4 /* Release */ = { 430 | isa = XCBuildConfiguration; 431 | buildSettings = { 432 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 433 | INFOPLIST_FILE = FJSWaveProgressView/Info.plist; 434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 435 | PRODUCT_BUNDLE_IDENTIFIER = com.biquu.FJSWaveProgressView; 436 | PRODUCT_NAME = "$(TARGET_NAME)"; 437 | }; 438 | name = Release; 439 | }; 440 | D21F9CCF1D23C9CF00851ED4 /* Debug */ = { 441 | isa = XCBuildConfiguration; 442 | buildSettings = { 443 | BUNDLE_LOADER = "$(TEST_HOST)"; 444 | INFOPLIST_FILE = FJSWaveProgressViewTests/Info.plist; 445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 446 | PRODUCT_BUNDLE_IDENTIFIER = com.biquu.FJSWaveProgressViewTests; 447 | PRODUCT_NAME = "$(TARGET_NAME)"; 448 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FJSWaveProgressView.app/FJSWaveProgressView"; 449 | }; 450 | name = Debug; 451 | }; 452 | D21F9CD01D23C9CF00851ED4 /* Release */ = { 453 | isa = XCBuildConfiguration; 454 | buildSettings = { 455 | BUNDLE_LOADER = "$(TEST_HOST)"; 456 | INFOPLIST_FILE = FJSWaveProgressViewTests/Info.plist; 457 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 458 | PRODUCT_BUNDLE_IDENTIFIER = com.biquu.FJSWaveProgressViewTests; 459 | PRODUCT_NAME = "$(TARGET_NAME)"; 460 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FJSWaveProgressView.app/FJSWaveProgressView"; 461 | }; 462 | name = Release; 463 | }; 464 | D21F9CD21D23C9CF00851ED4 /* Debug */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | INFOPLIST_FILE = FJSWaveProgressViewUITests/Info.plist; 468 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 469 | PRODUCT_BUNDLE_IDENTIFIER = com.biquu.FJSWaveProgressViewUITests; 470 | PRODUCT_NAME = "$(TARGET_NAME)"; 471 | TEST_TARGET_NAME = FJSWaveProgressView; 472 | }; 473 | name = Debug; 474 | }; 475 | D21F9CD31D23C9CF00851ED4 /* Release */ = { 476 | isa = XCBuildConfiguration; 477 | buildSettings = { 478 | INFOPLIST_FILE = FJSWaveProgressViewUITests/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 480 | PRODUCT_BUNDLE_IDENTIFIER = com.biquu.FJSWaveProgressViewUITests; 481 | PRODUCT_NAME = "$(TARGET_NAME)"; 482 | TEST_TARGET_NAME = FJSWaveProgressView; 483 | }; 484 | name = Release; 485 | }; 486 | /* End XCBuildConfiguration section */ 487 | 488 | /* Begin XCConfigurationList section */ 489 | D21F9C991D23C9CF00851ED4 /* Build configuration list for PBXProject "FJSWaveProgressView" */ = { 490 | isa = XCConfigurationList; 491 | buildConfigurations = ( 492 | D21F9CC91D23C9CF00851ED4 /* Debug */, 493 | D21F9CCA1D23C9CF00851ED4 /* Release */, 494 | ); 495 | defaultConfigurationIsVisible = 0; 496 | defaultConfigurationName = Release; 497 | }; 498 | D21F9CCB1D23C9CF00851ED4 /* Build configuration list for PBXNativeTarget "FJSWaveProgressView" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | D21F9CCC1D23C9CF00851ED4 /* Debug */, 502 | D21F9CCD1D23C9CF00851ED4 /* Release */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | }; 506 | D21F9CCE1D23C9CF00851ED4 /* Build configuration list for PBXNativeTarget "FJSWaveProgressViewTests" */ = { 507 | isa = XCConfigurationList; 508 | buildConfigurations = ( 509 | D21F9CCF1D23C9CF00851ED4 /* Debug */, 510 | D21F9CD01D23C9CF00851ED4 /* Release */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | }; 514 | D21F9CD11D23C9CF00851ED4 /* Build configuration list for PBXNativeTarget "FJSWaveProgressViewUITests" */ = { 515 | isa = XCConfigurationList; 516 | buildConfigurations = ( 517 | D21F9CD21D23C9CF00851ED4 /* Debug */, 518 | D21F9CD31D23C9CF00851ED4 /* Release */, 519 | ); 520 | defaultConfigurationIsVisible = 0; 521 | }; 522 | /* End XCConfigurationList section */ 523 | }; 524 | rootObject = D21F9C961D23C9CF00851ED4 /* Project object */; 525 | } 526 | -------------------------------------------------------------------------------- /FJSWaveProgressView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FJSWaveProgressView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // FJSWaveProgressView 4 | // 5 | // Created by 付金诗 on 16/6/29. 6 | // Copyright © 2016年 www.fujinshi.com. 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 | -------------------------------------------------------------------------------- /FJSWaveProgressView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // FJSWaveProgressView 4 | // 5 | // Created by 付金诗 on 16/6/29. 6 | // Copyright © 2016年 www.fujinshi.com. 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 | -------------------------------------------------------------------------------- /FJSWaveProgressView/Assets.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 | } -------------------------------------------------------------------------------- /FJSWaveProgressView/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FJSWaveProgressView/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 | -------------------------------------------------------------------------------- /FJSWaveProgressView/FJSWaveProgress.h: -------------------------------------------------------------------------------- 1 | // 2 | // FJSWaveProgress.h 3 | // FJSWaveAnimation 4 | // 5 | // Created by 付金诗 on 16/6/29. 6 | // Copyright © 2016年 www.fujinshi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FJSWaveProgress : UIView 12 | @property (nonatomic,assign)CGFloat progress; 13 | @property (nonatomic,assign)CGFloat speed;/**< 波动的速度*/ 14 | @property (nonatomic,strong)UIColor * waveColor; 15 | @property (nonatomic,assign)CGFloat waveHeight; 16 | @end 17 | -------------------------------------------------------------------------------- /FJSWaveProgressView/FJSWaveProgress.m: -------------------------------------------------------------------------------- 1 | // 2 | // FJSWaveProgress.m 3 | // FJSWaveAnimation 4 | // 5 | // Created by 付金诗 on 16/6/29. 6 | // Copyright © 2016年 www.fujinshi.com. All rights reserved. 7 | // 8 | 9 | #import "FJSWaveProgress.h" 10 | 11 | @interface FJSWaveProgress () 12 | @property (nonatomic,assign)CGFloat yHeight;/**< 当前进度对应的y值,由于y是向下递增,所以要注意 */ 13 | @property (nonatomic,assign)CGFloat offset;/**< 偏移量,决定了这个点在y轴上的位置,以此来实现动态效果*/ 14 | @property (nonatomic,strong)CADisplayLink * link;/**< 定时器*/ 15 | @property (nonatomic,strong)CAShapeLayer * waveLayer;/**< 水波的layer */ 16 | @property (nonatomic,strong)UILabel * label; 17 | @end 18 | @implementation FJSWaveProgress 19 | 20 | //水波动画的关键点就在于正余弦函数,使用两条正余弦函数进行周期性变化,就会产生所谓的波纹动画. 21 | /* 22 | 正弦型函数解析式:y=Asin(ωx+φ)+h 23 | 各常数值对函数图像的影响: 24 | φ(初相位):决定波形与X轴位置关系或横向移动距离(左加右减) 25 | ω:决定周期(最小正周期T=2π/|ω|) 26 | A:决定峰值(即纵向拉伸压缩的倍数) 27 | h:表示波形在Y轴的位置关系或纵向移动距离(上加下减) 28 | */ 29 | /* 30 | 如果想绘制出来一条正弦函数曲线,可以沿着假想的曲线绘制许多个点,然后把点逐一用直线连在一起,如果点足够多,就可以得到一条满足需求的曲线,这也是一种微分的思想。而这些点的位置可以通过正弦函数的解析式求得。 31 | 加入水波的峰值是1,周期是2π,初相位是0,h位移也是0。那么计算各个点的坐标公式就是y = sin(x);获得各个点的坐标之后,使用CGPathAddLineToPoint这个函数,把这些点逐一连成线,就可以得到最后的路径。 32 | */ 33 | /* 34 | 如果想要得到一个动态的波纹,随着时间的变化,我们如果假定每个点的x位置没有变化,那么只要让其y随着时间有规律的变化就可以让人觉得是在有规律的动.需要注意UIKit的坐标系统y轴是向下延伸。 35 | 如果想在0到2π这个距离显示2个完整的波曲线,那么周期就是π.如果每次增加π/4,则4s就会完成一个周期. 36 | 如果想要在width上来宽度上展示2个周期的水波,则周期是waveWidth / 2,w = 2 * M_PI / waveWidth 37 | */ 38 | 39 | - (instancetype)initWithFrame:(CGRect)frame 40 | { 41 | self = [super initWithFrame:frame]; 42 | if (self) { 43 | self.bounds = CGRectMake(0, 0, MIN(frame.size.width, frame.size.height), MIN(frame.size.width, frame.size.height)); 44 | self.layer.cornerRadius = MIN(frame.size.width, frame.size.height) * 0.5; 45 | self.layer.masksToBounds = YES; 46 | self.layer.borderColor = [UIColor lightGrayColor].CGColor; 47 | self.layer.borderWidth = 1.0f; 48 | 49 | self.waveHeight = 5.0; 50 | self.waveColor = [UIColor greenColor]; 51 | self.yHeight = self.bounds.size.height; 52 | self.waveLayer = [CAShapeLayer layer]; 53 | self.waveLayer.frame = self.bounds; 54 | self.waveLayer.fillColor = [UIColor whiteColor].CGColor; 55 | [self.layer addSublayer:self.waveLayer]; 56 | 57 | self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; 58 | self.label.font = [UIFont boldSystemFontOfSize:20]; 59 | self.label.textAlignment = 1; 60 | self.label.textColor = [UIColor orangeColor]; 61 | [self addSubview:self.label]; 62 | self.label.center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); 63 | } 64 | return self; 65 | } 66 | 67 | -(void)setProgress:(CGFloat)progress 68 | { 69 | _progress = progress; 70 | //将进度转成百分比. 71 | self.label.text = [NSString stringWithFormat:@"%ld%%",[[NSNumber numberWithFloat:progress * 100] integerValue]]; 72 | [self.label sizeToFit]; 73 | //由于y坐标轴的方向是由上向下,逐渐增加的,所以这里对于y坐标进行处理 74 | self.yHeight = self.bounds.size.height * (1 - progress); 75 | //先停止动画,然后在开始动画,保证不会有什么冲突和重复. 76 | [self stopWaveAnimation]; 77 | [self startWaveAnimation]; 78 | } 79 | 80 | #pragma mark -- 开始波动动画 81 | - (void)startWaveAnimation 82 | { 83 | //相对于NSTimer CADisplayLink更准确,每一帧调用一次. 84 | self.link = [CADisplayLink displayLinkWithTarget:self selector:@selector(waveAnimation)]; 85 | [self.link addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; 86 | } 87 | 88 | #pragma mark -- 停止波动动画 89 | - (void)stopWaveAnimation 90 | { 91 | [self.link invalidate]; 92 | self.link = nil; 93 | } 94 | 95 | 96 | #pragma mark -- 波动动画实现 97 | - (void)waveAnimation 98 | { 99 | CGFloat waveHeight = self.waveHeight; 100 | //如果是0或者1,则不需要wave的高度,否则会看出来一个小的波动. 101 | if (self.progress == 0.0f || self.progress == 1.0f) { 102 | waveHeight = 0.f; 103 | } 104 | //累加偏移量,这样就可以通过speed来控制波动的速度了.对于正弦函数中的各个参数,你可以通过上面的注释进行了解. 105 | self.offset += self.speed; 106 | CGMutablePathRef pathRef = CGPathCreateMutable(); 107 | CGFloat startOffY = waveHeight * sinf(self.offset * M_PI * 2 / self.bounds.size.width); 108 | CGFloat orignOffY = 0.0; 109 | CGPathMoveToPoint(pathRef, NULL, 0, startOffY); 110 | for (CGFloat i = 0.f; i <= self.bounds.size.width; i++) { 111 | orignOffY = waveHeight * sinf(2 * M_PI / self.bounds.size.width * i + self.offset * M_PI * 2 / self.bounds.size.width) + self.yHeight; 112 | CGPathAddLineToPoint(pathRef, NULL, i, orignOffY); 113 | } 114 | //连接四个角和以及波浪,共同组成水波. 115 | CGPathAddLineToPoint(pathRef, NULL, self.bounds.size.width, orignOffY); 116 | CGPathAddLineToPoint(pathRef, NULL, self.bounds.size.width, self.bounds.size.height); 117 | CGPathAddLineToPoint(pathRef, NULL, 0, self.bounds.size.height); 118 | CGPathAddLineToPoint(pathRef, NULL, 0, startOffY); 119 | CGPathCloseSubpath(pathRef); 120 | self.waveLayer.path = pathRef; 121 | self.waveLayer.fillColor = self.waveColor.CGColor; 122 | CGPathRelease(pathRef); 123 | } 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | /* 134 | // Only override drawRect: if you perform custom drawing. 135 | // An empty implementation adversely affects performance during animation. 136 | - (void)drawRect:(CGRect)rect { 137 | // Drawing code 138 | } 139 | */ 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /FJSWaveProgressView/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 | -------------------------------------------------------------------------------- /FJSWaveProgressView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // FJSWaveAnimation 4 | // 5 | // Created by 付金诗 on 16/6/27. 6 | // Copyright © 2016年 www.fujinshi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FJSWaveProgressView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // FJSWaveAnimation 4 | // 5 | // Created by 付金诗 on 16/6/27. 6 | // Copyright © 2016年 www.fujinshi.com. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "FJSWaveProgress.h" 11 | @interface ViewController () 12 | @property (nonatomic,strong)FJSWaveProgress * progressView; 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view, typically from a nib. 20 | self.view.backgroundColor = [UIColor whiteColor]; 21 | self.navigationItem.title = @"FJSWaveProgressView"; 22 | self.progressView = [[FJSWaveProgress alloc] initWithFrame:CGRectMake(60, 100, 150, 150)]; 23 | self.progressView.waveHeight = 5; 24 | self.progressView.speed = 1.0; 25 | [self.view addSubview:self.progressView]; 26 | 27 | CGPoint center = self.progressView.center; 28 | center.x = CGRectGetMidX(self.view.bounds); 29 | self.progressView.center = center; 30 | 31 | UISlider * slider = [[UISlider alloc] initWithFrame:CGRectMake(60, 300, self.view.bounds.size.width - 60 * 2, 30)]; 32 | [slider addTarget:self action:@selector(changeProgress:) forControlEvents:UIControlEventValueChanged]; 33 | [self.view addSubview:slider]; 34 | } 35 | 36 | - (void)changeProgress:(UISlider *)slider 37 | { 38 | self.progressView.progress = slider.value; 39 | } 40 | 41 | 42 | - (void)didReceiveMemoryWarning { 43 | [super didReceiveMemoryWarning]; 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /FJSWaveProgressView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FJSWaveProgressView 4 | // 5 | // Created by 付金诗 on 16/6/29. 6 | // Copyright © 2016年 www.fujinshi.com. 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 | -------------------------------------------------------------------------------- /FJSWaveProgressViewTests/FJSWaveProgressViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FJSWaveProgressViewTests.m 3 | // FJSWaveProgressViewTests 4 | // 5 | // Created by 付金诗 on 16/6/29. 6 | // Copyright © 2016年 www.fujinshi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FJSWaveProgressViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FJSWaveProgressViewTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /FJSWaveProgressViewTests/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 | -------------------------------------------------------------------------------- /FJSWaveProgressViewUITests/FJSWaveProgressViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FJSWaveProgressViewUITests.m 3 | // FJSWaveProgressViewUITests 4 | // 5 | // Created by 付金诗 on 16/6/29. 6 | // Copyright © 2016年 www.fujinshi.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FJSWaveProgressViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FJSWaveProgressViewUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /FJSWaveProgressViewUITests/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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 BestJoker 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FJSWaveProgressView 2 | 一个水波的加载动画,A progressView that ti imitations the water waving 3 | 4 | ![image](https://github.com/BestJoker/FJSWaveProgressView/blob/master/FJSWaveProgressView.gif?raw=true) 5 | 6 | --------------------------------------------------------------------------------