├── LXWaveProgressDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── liuxin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── liuxin.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── LXWaveProgressDemo.xcscheme │ └── xcschememanagement.plist ├── LXWaveProgressDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── DemoTableViewController.h ├── DemoTableViewController.m ├── DemoTableViewController.xib ├── DemoViewController.h ├── DemoViewController.m ├── Info.plist ├── LXWaveProgressView │ ├── LXWaveProgressView.h │ ├── LXWaveProgressView.m │ ├── YYWeakProxy.h │ └── YYWeakProxy.m ├── ViewController.h ├── ViewController.m ├── WaveTableViewCell.h ├── WaveTableViewCell.m └── main.m ├── LXWaveProgressDemoTests ├── Info.plist └── LXWaveProgressDemoTests.m ├── LXWaveProgressDemoUITests ├── Info.plist └── LXWaveProgressDemoUITests.m └── README.md /LXWaveProgressDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4B8437931D4EFA79007C9D93 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437921D4EFA79007C9D93 /* main.m */; }; 11 | 4B8437961D4EFA79007C9D93 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437951D4EFA79007C9D93 /* AppDelegate.m */; }; 12 | 4B8437991D4EFA79007C9D93 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437981D4EFA79007C9D93 /* ViewController.m */; }; 13 | 4B84379C1D4EFA79007C9D93 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B84379A1D4EFA79007C9D93 /* Main.storyboard */; }; 14 | 4B84379E1D4EFA79007C9D93 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B84379D1D4EFA79007C9D93 /* Assets.xcassets */; }; 15 | 4B8437A11D4EFA79007C9D93 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B84379F1D4EFA79007C9D93 /* LaunchScreen.storyboard */; }; 16 | 4B8437AC1D4EFA79007C9D93 /* LXWaveProgressDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437AB1D4EFA79007C9D93 /* LXWaveProgressDemoTests.m */; }; 17 | 4B8437B71D4EFA79007C9D93 /* LXWaveProgressDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437B61D4EFA79007C9D93 /* LXWaveProgressDemoUITests.m */; }; 18 | 4B8437C71D4EFAD7007C9D93 /* LXWaveProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437C61D4EFAD7007C9D93 /* LXWaveProgressView.m */; }; 19 | 4B8437CB1D4F1E44007C9D93 /* DemoTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437C91D4F1E44007C9D93 /* DemoTableViewController.m */; }; 20 | 4B8437CC1D4F1E44007C9D93 /* DemoTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B8437CA1D4F1E44007C9D93 /* DemoTableViewController.xib */; }; 21 | 4B8437CF1D4F1E5F007C9D93 /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437CE1D4F1E5F007C9D93 /* DemoViewController.m */; }; 22 | 4B8437D91D4F463E007C9D93 /* YYWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437D81D4F463E007C9D93 /* YYWeakProxy.m */; }; 23 | 4B8437DC1D4F49EA007C9D93 /* WaveTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8437DB1D4F49EA007C9D93 /* WaveTableViewCell.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 4B8437A81D4EFA79007C9D93 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 4B8437861D4EFA79007C9D93 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 4B84378D1D4EFA79007C9D93; 32 | remoteInfo = LXWaveProgressDemo; 33 | }; 34 | 4B8437B31D4EFA79007C9D93 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 4B8437861D4EFA79007C9D93 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 4B84378D1D4EFA79007C9D93; 39 | remoteInfo = LXWaveProgressDemo; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 4B84378E1D4EFA79007C9D93 /* LXWaveProgressDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LXWaveProgressDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 4B8437921D4EFA79007C9D93 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | 4B8437941D4EFA79007C9D93 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 47 | 4B8437951D4EFA79007C9D93 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 48 | 4B8437971D4EFA79007C9D93 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 49 | 4B8437981D4EFA79007C9D93 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 50 | 4B84379B1D4EFA79007C9D93 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 4B84379D1D4EFA79007C9D93 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 4B8437A01D4EFA79007C9D93 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 4B8437A21D4EFA79007C9D93 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 4B8437A71D4EFA79007C9D93 /* LXWaveProgressDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LXWaveProgressDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 4B8437AB1D4EFA79007C9D93 /* LXWaveProgressDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LXWaveProgressDemoTests.m; sourceTree = ""; }; 56 | 4B8437AD1D4EFA79007C9D93 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 4B8437B21D4EFA79007C9D93 /* LXWaveProgressDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LXWaveProgressDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 4B8437B61D4EFA79007C9D93 /* LXWaveProgressDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LXWaveProgressDemoUITests.m; sourceTree = ""; }; 59 | 4B8437B81D4EFA79007C9D93 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | 4B8437C51D4EFAD7007C9D93 /* LXWaveProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXWaveProgressView.h; sourceTree = ""; }; 61 | 4B8437C61D4EFAD7007C9D93 /* LXWaveProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXWaveProgressView.m; sourceTree = ""; }; 62 | 4B8437C81D4F1E44007C9D93 /* DemoTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoTableViewController.h; sourceTree = ""; }; 63 | 4B8437C91D4F1E44007C9D93 /* DemoTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoTableViewController.m; sourceTree = ""; }; 64 | 4B8437CA1D4F1E44007C9D93 /* DemoTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DemoTableViewController.xib; sourceTree = ""; }; 65 | 4B8437CD1D4F1E5F007C9D93 /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; }; 66 | 4B8437CE1D4F1E5F007C9D93 /* DemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoViewController.m; sourceTree = ""; }; 67 | 4B8437D71D4F463E007C9D93 /* YYWeakProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YYWeakProxy.h; sourceTree = ""; }; 68 | 4B8437D81D4F463E007C9D93 /* YYWeakProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YYWeakProxy.m; sourceTree = ""; }; 69 | 4B8437DA1D4F49EA007C9D93 /* WaveTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveTableViewCell.h; sourceTree = ""; }; 70 | 4B8437DB1D4F49EA007C9D93 /* WaveTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaveTableViewCell.m; sourceTree = ""; }; 71 | /* End PBXFileReference section */ 72 | 73 | /* Begin PBXFrameworksBuildPhase section */ 74 | 4B84378B1D4EFA79007C9D93 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 4B8437A41D4EFA79007C9D93 /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | 4B8437AF1D4EFA79007C9D93 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 4B8437851D4EFA79007C9D93 = { 99 | isa = PBXGroup; 100 | children = ( 101 | 4B8437901D4EFA79007C9D93 /* LXWaveProgressDemo */, 102 | 4B8437AA1D4EFA79007C9D93 /* LXWaveProgressDemoTests */, 103 | 4B8437B51D4EFA79007C9D93 /* LXWaveProgressDemoUITests */, 104 | 4B84378F1D4EFA79007C9D93 /* Products */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | 4B84378F1D4EFA79007C9D93 /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 4B84378E1D4EFA79007C9D93 /* LXWaveProgressDemo.app */, 112 | 4B8437A71D4EFA79007C9D93 /* LXWaveProgressDemoTests.xctest */, 113 | 4B8437B21D4EFA79007C9D93 /* LXWaveProgressDemoUITests.xctest */, 114 | ); 115 | name = Products; 116 | sourceTree = ""; 117 | }; 118 | 4B8437901D4EFA79007C9D93 /* LXWaveProgressDemo */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 4B8437C41D4EFAB2007C9D93 /* LXWaveProgressView */, 122 | 4B8437941D4EFA79007C9D93 /* AppDelegate.h */, 123 | 4B8437951D4EFA79007C9D93 /* AppDelegate.m */, 124 | 4B8437971D4EFA79007C9D93 /* ViewController.h */, 125 | 4B8437981D4EFA79007C9D93 /* ViewController.m */, 126 | 4B84379A1D4EFA79007C9D93 /* Main.storyboard */, 127 | 4B8437C81D4F1E44007C9D93 /* DemoTableViewController.h */, 128 | 4B8437C91D4F1E44007C9D93 /* DemoTableViewController.m */, 129 | 4B8437CA1D4F1E44007C9D93 /* DemoTableViewController.xib */, 130 | 4B8437DA1D4F49EA007C9D93 /* WaveTableViewCell.h */, 131 | 4B8437DB1D4F49EA007C9D93 /* WaveTableViewCell.m */, 132 | 4B8437CD1D4F1E5F007C9D93 /* DemoViewController.h */, 133 | 4B8437CE1D4F1E5F007C9D93 /* DemoViewController.m */, 134 | 4B84379D1D4EFA79007C9D93 /* Assets.xcassets */, 135 | 4B84379F1D4EFA79007C9D93 /* LaunchScreen.storyboard */, 136 | 4B8437A21D4EFA79007C9D93 /* Info.plist */, 137 | 4B8437911D4EFA79007C9D93 /* Supporting Files */, 138 | ); 139 | path = LXWaveProgressDemo; 140 | sourceTree = ""; 141 | }; 142 | 4B8437911D4EFA79007C9D93 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 4B8437921D4EFA79007C9D93 /* main.m */, 146 | ); 147 | name = "Supporting Files"; 148 | sourceTree = ""; 149 | }; 150 | 4B8437AA1D4EFA79007C9D93 /* LXWaveProgressDemoTests */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 4B8437AB1D4EFA79007C9D93 /* LXWaveProgressDemoTests.m */, 154 | 4B8437AD1D4EFA79007C9D93 /* Info.plist */, 155 | ); 156 | path = LXWaveProgressDemoTests; 157 | sourceTree = ""; 158 | }; 159 | 4B8437B51D4EFA79007C9D93 /* LXWaveProgressDemoUITests */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 4B8437B61D4EFA79007C9D93 /* LXWaveProgressDemoUITests.m */, 163 | 4B8437B81D4EFA79007C9D93 /* Info.plist */, 164 | ); 165 | path = LXWaveProgressDemoUITests; 166 | sourceTree = ""; 167 | }; 168 | 4B8437C41D4EFAB2007C9D93 /* LXWaveProgressView */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 4B8437C51D4EFAD7007C9D93 /* LXWaveProgressView.h */, 172 | 4B8437C61D4EFAD7007C9D93 /* LXWaveProgressView.m */, 173 | 4B8437D71D4F463E007C9D93 /* YYWeakProxy.h */, 174 | 4B8437D81D4F463E007C9D93 /* YYWeakProxy.m */, 175 | ); 176 | path = LXWaveProgressView; 177 | sourceTree = ""; 178 | }; 179 | /* End PBXGroup section */ 180 | 181 | /* Begin PBXNativeTarget section */ 182 | 4B84378D1D4EFA79007C9D93 /* LXWaveProgressDemo */ = { 183 | isa = PBXNativeTarget; 184 | buildConfigurationList = 4B8437BB1D4EFA79007C9D93 /* Build configuration list for PBXNativeTarget "LXWaveProgressDemo" */; 185 | buildPhases = ( 186 | 4B84378A1D4EFA79007C9D93 /* Sources */, 187 | 4B84378B1D4EFA79007C9D93 /* Frameworks */, 188 | 4B84378C1D4EFA79007C9D93 /* Resources */, 189 | ); 190 | buildRules = ( 191 | ); 192 | dependencies = ( 193 | ); 194 | name = LXWaveProgressDemo; 195 | productName = LXWaveProgressDemo; 196 | productReference = 4B84378E1D4EFA79007C9D93 /* LXWaveProgressDemo.app */; 197 | productType = "com.apple.product-type.application"; 198 | }; 199 | 4B8437A61D4EFA79007C9D93 /* LXWaveProgressDemoTests */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = 4B8437BE1D4EFA79007C9D93 /* Build configuration list for PBXNativeTarget "LXWaveProgressDemoTests" */; 202 | buildPhases = ( 203 | 4B8437A31D4EFA79007C9D93 /* Sources */, 204 | 4B8437A41D4EFA79007C9D93 /* Frameworks */, 205 | 4B8437A51D4EFA79007C9D93 /* Resources */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | 4B8437A91D4EFA79007C9D93 /* PBXTargetDependency */, 211 | ); 212 | name = LXWaveProgressDemoTests; 213 | productName = LXWaveProgressDemoTests; 214 | productReference = 4B8437A71D4EFA79007C9D93 /* LXWaveProgressDemoTests.xctest */; 215 | productType = "com.apple.product-type.bundle.unit-test"; 216 | }; 217 | 4B8437B11D4EFA79007C9D93 /* LXWaveProgressDemoUITests */ = { 218 | isa = PBXNativeTarget; 219 | buildConfigurationList = 4B8437C11D4EFA79007C9D93 /* Build configuration list for PBXNativeTarget "LXWaveProgressDemoUITests" */; 220 | buildPhases = ( 221 | 4B8437AE1D4EFA79007C9D93 /* Sources */, 222 | 4B8437AF1D4EFA79007C9D93 /* Frameworks */, 223 | 4B8437B01D4EFA79007C9D93 /* Resources */, 224 | ); 225 | buildRules = ( 226 | ); 227 | dependencies = ( 228 | 4B8437B41D4EFA79007C9D93 /* PBXTargetDependency */, 229 | ); 230 | name = LXWaveProgressDemoUITests; 231 | productName = LXWaveProgressDemoUITests; 232 | productReference = 4B8437B21D4EFA79007C9D93 /* LXWaveProgressDemoUITests.xctest */; 233 | productType = "com.apple.product-type.bundle.ui-testing"; 234 | }; 235 | /* End PBXNativeTarget section */ 236 | 237 | /* Begin PBXProject section */ 238 | 4B8437861D4EFA79007C9D93 /* Project object */ = { 239 | isa = PBXProject; 240 | attributes = { 241 | LastUpgradeCheck = 0730; 242 | ORGANIZATIONNAME = liuxin; 243 | TargetAttributes = { 244 | 4B84378D1D4EFA79007C9D93 = { 245 | CreatedOnToolsVersion = 7.3.1; 246 | }; 247 | 4B8437A61D4EFA79007C9D93 = { 248 | CreatedOnToolsVersion = 7.3.1; 249 | TestTargetID = 4B84378D1D4EFA79007C9D93; 250 | }; 251 | 4B8437B11D4EFA79007C9D93 = { 252 | CreatedOnToolsVersion = 7.3.1; 253 | TestTargetID = 4B84378D1D4EFA79007C9D93; 254 | }; 255 | }; 256 | }; 257 | buildConfigurationList = 4B8437891D4EFA79007C9D93 /* Build configuration list for PBXProject "LXWaveProgressDemo" */; 258 | compatibilityVersion = "Xcode 3.2"; 259 | developmentRegion = English; 260 | hasScannedForEncodings = 0; 261 | knownRegions = ( 262 | en, 263 | Base, 264 | ); 265 | mainGroup = 4B8437851D4EFA79007C9D93; 266 | productRefGroup = 4B84378F1D4EFA79007C9D93 /* Products */; 267 | projectDirPath = ""; 268 | projectRoot = ""; 269 | targets = ( 270 | 4B84378D1D4EFA79007C9D93 /* LXWaveProgressDemo */, 271 | 4B8437A61D4EFA79007C9D93 /* LXWaveProgressDemoTests */, 272 | 4B8437B11D4EFA79007C9D93 /* LXWaveProgressDemoUITests */, 273 | ); 274 | }; 275 | /* End PBXProject section */ 276 | 277 | /* Begin PBXResourcesBuildPhase section */ 278 | 4B84378C1D4EFA79007C9D93 /* Resources */ = { 279 | isa = PBXResourcesBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | 4B8437CC1D4F1E44007C9D93 /* DemoTableViewController.xib in Resources */, 283 | 4B8437A11D4EFA79007C9D93 /* LaunchScreen.storyboard in Resources */, 284 | 4B84379E1D4EFA79007C9D93 /* Assets.xcassets in Resources */, 285 | 4B84379C1D4EFA79007C9D93 /* Main.storyboard in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | 4B8437A51D4EFA79007C9D93 /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | 4B8437B01D4EFA79007C9D93 /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXResourcesBuildPhase section */ 304 | 305 | /* Begin PBXSourcesBuildPhase section */ 306 | 4B84378A1D4EFA79007C9D93 /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | 4B8437991D4EFA79007C9D93 /* ViewController.m in Sources */, 311 | 4B8437961D4EFA79007C9D93 /* AppDelegate.m in Sources */, 312 | 4B8437CB1D4F1E44007C9D93 /* DemoTableViewController.m in Sources */, 313 | 4B8437CF1D4F1E5F007C9D93 /* DemoViewController.m in Sources */, 314 | 4B8437DC1D4F49EA007C9D93 /* WaveTableViewCell.m in Sources */, 315 | 4B8437D91D4F463E007C9D93 /* YYWeakProxy.m in Sources */, 316 | 4B8437C71D4EFAD7007C9D93 /* LXWaveProgressView.m in Sources */, 317 | 4B8437931D4EFA79007C9D93 /* main.m in Sources */, 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | 4B8437A31D4EFA79007C9D93 /* Sources */ = { 322 | isa = PBXSourcesBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | 4B8437AC1D4EFA79007C9D93 /* LXWaveProgressDemoTests.m in Sources */, 326 | ); 327 | runOnlyForDeploymentPostprocessing = 0; 328 | }; 329 | 4B8437AE1D4EFA79007C9D93 /* Sources */ = { 330 | isa = PBXSourcesBuildPhase; 331 | buildActionMask = 2147483647; 332 | files = ( 333 | 4B8437B71D4EFA79007C9D93 /* LXWaveProgressDemoUITests.m in Sources */, 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | }; 337 | /* End PBXSourcesBuildPhase section */ 338 | 339 | /* Begin PBXTargetDependency section */ 340 | 4B8437A91D4EFA79007C9D93 /* PBXTargetDependency */ = { 341 | isa = PBXTargetDependency; 342 | target = 4B84378D1D4EFA79007C9D93 /* LXWaveProgressDemo */; 343 | targetProxy = 4B8437A81D4EFA79007C9D93 /* PBXContainerItemProxy */; 344 | }; 345 | 4B8437B41D4EFA79007C9D93 /* PBXTargetDependency */ = { 346 | isa = PBXTargetDependency; 347 | target = 4B84378D1D4EFA79007C9D93 /* LXWaveProgressDemo */; 348 | targetProxy = 4B8437B31D4EFA79007C9D93 /* PBXContainerItemProxy */; 349 | }; 350 | /* End PBXTargetDependency section */ 351 | 352 | /* Begin PBXVariantGroup section */ 353 | 4B84379A1D4EFA79007C9D93 /* Main.storyboard */ = { 354 | isa = PBXVariantGroup; 355 | children = ( 356 | 4B84379B1D4EFA79007C9D93 /* Base */, 357 | ); 358 | name = Main.storyboard; 359 | sourceTree = ""; 360 | }; 361 | 4B84379F1D4EFA79007C9D93 /* LaunchScreen.storyboard */ = { 362 | isa = PBXVariantGroup; 363 | children = ( 364 | 4B8437A01D4EFA79007C9D93 /* Base */, 365 | ); 366 | name = LaunchScreen.storyboard; 367 | sourceTree = ""; 368 | }; 369 | /* End PBXVariantGroup section */ 370 | 371 | /* Begin XCBuildConfiguration section */ 372 | 4B8437B91D4EFA79007C9D93 /* Debug */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ALWAYS_SEARCH_USER_PATHS = NO; 376 | CLANG_ANALYZER_NONNULL = YES; 377 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 378 | CLANG_CXX_LIBRARY = "libc++"; 379 | CLANG_ENABLE_MODULES = YES; 380 | CLANG_ENABLE_OBJC_ARC = YES; 381 | CLANG_WARN_BOOL_CONVERSION = YES; 382 | CLANG_WARN_CONSTANT_CONVERSION = YES; 383 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 384 | CLANG_WARN_EMPTY_BODY = YES; 385 | CLANG_WARN_ENUM_CONVERSION = YES; 386 | CLANG_WARN_INT_CONVERSION = YES; 387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 388 | CLANG_WARN_UNREACHABLE_CODE = YES; 389 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 390 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 391 | COPY_PHASE_STRIP = NO; 392 | DEBUG_INFORMATION_FORMAT = dwarf; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | ENABLE_TESTABILITY = YES; 395 | GCC_C_LANGUAGE_STANDARD = gnu99; 396 | GCC_DYNAMIC_NO_PIC = NO; 397 | GCC_NO_COMMON_BLOCKS = YES; 398 | GCC_OPTIMIZATION_LEVEL = 0; 399 | GCC_PREPROCESSOR_DEFINITIONS = ( 400 | "DEBUG=1", 401 | "$(inherited)", 402 | ); 403 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 404 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 405 | GCC_WARN_UNDECLARED_SELECTOR = YES; 406 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 407 | GCC_WARN_UNUSED_FUNCTION = YES; 408 | GCC_WARN_UNUSED_VARIABLE = YES; 409 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 410 | MTL_ENABLE_DEBUG_INFO = YES; 411 | ONLY_ACTIVE_ARCH = YES; 412 | SDKROOT = iphoneos; 413 | }; 414 | name = Debug; 415 | }; 416 | 4B8437BA1D4EFA79007C9D93 /* Release */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ALWAYS_SEARCH_USER_PATHS = NO; 420 | CLANG_ANALYZER_NONNULL = YES; 421 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 422 | CLANG_CXX_LIBRARY = "libc++"; 423 | CLANG_ENABLE_MODULES = YES; 424 | CLANG_ENABLE_OBJC_ARC = YES; 425 | CLANG_WARN_BOOL_CONVERSION = YES; 426 | CLANG_WARN_CONSTANT_CONVERSION = YES; 427 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 428 | CLANG_WARN_EMPTY_BODY = YES; 429 | CLANG_WARN_ENUM_CONVERSION = YES; 430 | CLANG_WARN_INT_CONVERSION = YES; 431 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 432 | CLANG_WARN_UNREACHABLE_CODE = YES; 433 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 434 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 435 | COPY_PHASE_STRIP = NO; 436 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 437 | ENABLE_NS_ASSERTIONS = NO; 438 | ENABLE_STRICT_OBJC_MSGSEND = YES; 439 | GCC_C_LANGUAGE_STANDARD = gnu99; 440 | GCC_NO_COMMON_BLOCKS = YES; 441 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 442 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 443 | GCC_WARN_UNDECLARED_SELECTOR = YES; 444 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 445 | GCC_WARN_UNUSED_FUNCTION = YES; 446 | GCC_WARN_UNUSED_VARIABLE = YES; 447 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 448 | MTL_ENABLE_DEBUG_INFO = NO; 449 | SDKROOT = iphoneos; 450 | VALIDATE_PRODUCT = YES; 451 | }; 452 | name = Release; 453 | }; 454 | 4B8437BC1D4EFA79007C9D93 /* Debug */ = { 455 | isa = XCBuildConfiguration; 456 | buildSettings = { 457 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 458 | INFOPLIST_FILE = LXWaveProgressDemo/Info.plist; 459 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 460 | PRODUCT_BUNDLE_IDENTIFIER = com.myself.demo.LXWaveProgressDemo; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | }; 463 | name = Debug; 464 | }; 465 | 4B8437BD1D4EFA79007C9D93 /* Release */ = { 466 | isa = XCBuildConfiguration; 467 | buildSettings = { 468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 469 | INFOPLIST_FILE = LXWaveProgressDemo/Info.plist; 470 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 471 | PRODUCT_BUNDLE_IDENTIFIER = com.myself.demo.LXWaveProgressDemo; 472 | PRODUCT_NAME = "$(TARGET_NAME)"; 473 | }; 474 | name = Release; 475 | }; 476 | 4B8437BF1D4EFA79007C9D93 /* Debug */ = { 477 | isa = XCBuildConfiguration; 478 | buildSettings = { 479 | BUNDLE_LOADER = "$(TEST_HOST)"; 480 | INFOPLIST_FILE = LXWaveProgressDemoTests/Info.plist; 481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 482 | PRODUCT_BUNDLE_IDENTIFIER = com.myself.demo.LXWaveProgressDemoTests; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LXWaveProgressDemo.app/LXWaveProgressDemo"; 485 | }; 486 | name = Debug; 487 | }; 488 | 4B8437C01D4EFA79007C9D93 /* Release */ = { 489 | isa = XCBuildConfiguration; 490 | buildSettings = { 491 | BUNDLE_LOADER = "$(TEST_HOST)"; 492 | INFOPLIST_FILE = LXWaveProgressDemoTests/Info.plist; 493 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 494 | PRODUCT_BUNDLE_IDENTIFIER = com.myself.demo.LXWaveProgressDemoTests; 495 | PRODUCT_NAME = "$(TARGET_NAME)"; 496 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LXWaveProgressDemo.app/LXWaveProgressDemo"; 497 | }; 498 | name = Release; 499 | }; 500 | 4B8437C21D4EFA79007C9D93 /* Debug */ = { 501 | isa = XCBuildConfiguration; 502 | buildSettings = { 503 | INFOPLIST_FILE = LXWaveProgressDemoUITests/Info.plist; 504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 505 | PRODUCT_BUNDLE_IDENTIFIER = com.myself.demo.LXWaveProgressDemoUITests; 506 | PRODUCT_NAME = "$(TARGET_NAME)"; 507 | TEST_TARGET_NAME = LXWaveProgressDemo; 508 | }; 509 | name = Debug; 510 | }; 511 | 4B8437C31D4EFA79007C9D93 /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | INFOPLIST_FILE = LXWaveProgressDemoUITests/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 516 | PRODUCT_BUNDLE_IDENTIFIER = com.myself.demo.LXWaveProgressDemoUITests; 517 | PRODUCT_NAME = "$(TARGET_NAME)"; 518 | TEST_TARGET_NAME = LXWaveProgressDemo; 519 | }; 520 | name = Release; 521 | }; 522 | /* End XCBuildConfiguration section */ 523 | 524 | /* Begin XCConfigurationList section */ 525 | 4B8437891D4EFA79007C9D93 /* Build configuration list for PBXProject "LXWaveProgressDemo" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | 4B8437B91D4EFA79007C9D93 /* Debug */, 529 | 4B8437BA1D4EFA79007C9D93 /* Release */, 530 | ); 531 | defaultConfigurationIsVisible = 0; 532 | defaultConfigurationName = Release; 533 | }; 534 | 4B8437BB1D4EFA79007C9D93 /* Build configuration list for PBXNativeTarget "LXWaveProgressDemo" */ = { 535 | isa = XCConfigurationList; 536 | buildConfigurations = ( 537 | 4B8437BC1D4EFA79007C9D93 /* Debug */, 538 | 4B8437BD1D4EFA79007C9D93 /* Release */, 539 | ); 540 | defaultConfigurationIsVisible = 0; 541 | }; 542 | 4B8437BE1D4EFA79007C9D93 /* Build configuration list for PBXNativeTarget "LXWaveProgressDemoTests" */ = { 543 | isa = XCConfigurationList; 544 | buildConfigurations = ( 545 | 4B8437BF1D4EFA79007C9D93 /* Debug */, 546 | 4B8437C01D4EFA79007C9D93 /* Release */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | }; 550 | 4B8437C11D4EFA79007C9D93 /* Build configuration list for PBXNativeTarget "LXWaveProgressDemoUITests" */ = { 551 | isa = XCConfigurationList; 552 | buildConfigurations = ( 553 | 4B8437C21D4EFA79007C9D93 /* Debug */, 554 | 4B8437C31D4EFA79007C9D93 /* Release */, 555 | ); 556 | defaultConfigurationIsVisible = 0; 557 | }; 558 | /* End XCConfigurationList section */ 559 | }; 560 | rootObject = 4B8437861D4EFA79007C9D93 /* Project object */; 561 | } 562 | -------------------------------------------------------------------------------- /LXWaveProgressDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LXWaveProgressDemo.xcodeproj/project.xcworkspace/xcuserdata/liuxin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xinge1/LXWaveProgress/e026c58d8cac07a65749d99f28dd3f0db37c496b/LXWaveProgressDemo.xcodeproj/project.xcworkspace/xcuserdata/liuxin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /LXWaveProgressDemo.xcodeproj/xcuserdata/liuxin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /LXWaveProgressDemo.xcodeproj/xcuserdata/liuxin.xcuserdatad/xcschemes/LXWaveProgressDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /LXWaveProgressDemo.xcodeproj/xcuserdata/liuxin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | LXWaveProgressDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4B84378D1D4EFA79007C9D93 16 | 17 | primary 18 | 19 | 20 | 4B8437A61D4EFA79007C9D93 21 | 22 | primary 23 | 24 | 25 | 4B8437B11D4EFA79007C9D93 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. 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 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. 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 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/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 | } -------------------------------------------------------------------------------- /LXWaveProgressDemo/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 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/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 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/DemoTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoTableViewController.h 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DemoTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/DemoTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoTableViewController.m 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import "DemoTableViewController.h" 10 | #import "LXWaveProgressView.h" 11 | #import "WaveTableViewCell.h" 12 | 13 | @interface DemoTableViewController () 14 | 15 | @end 16 | 17 | @implementation DemoTableViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | self.tableView.rowHeight=100; 22 | [self.tableView registerClass:[WaveTableViewCell class] forCellReuseIdentifier:@"cell"]; 23 | // Uncomment the following line to preserve selection between presentations. 24 | // self.clearsSelectionOnViewWillAppear = NO; 25 | 26 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller. 27 | // self.navigationItem.rightBarButtonItem = self.editButtonItem; 28 | } 29 | 30 | - (void)didReceiveMemoryWarning { 31 | [super didReceiveMemoryWarning]; 32 | // Dispose of any resources that can be recreated. 33 | } 34 | 35 | #pragma mark - Table view data source 36 | 37 | //- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 38 | //#warning Incomplete implementation, return the number of sections 39 | // return 1; 40 | //} 41 | 42 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 43 | #warning Incomplete implementation, return the number of rows 44 | return 10; 45 | } 46 | 47 | // 48 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 49 | WaveTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath]; 50 | 51 | // Configure the cell... 52 | cell.progressView.progress=0.1+MIN(0.8, (indexPath.row)*0.1); 53 | cell.progressView.waveHeight=2+(indexPath.row)*0.1; 54 | cell.progressView.speed=(indexPath.row)*0.1+0.5; 55 | return cell; 56 | } 57 | // 58 | 59 | /* 60 | // Override to support conditional editing of the table view. 61 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { 62 | // Return NO if you do not want the specified item to be editable. 63 | return YES; 64 | } 65 | */ 66 | 67 | /* 68 | // Override to support editing the table view. 69 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { 70 | if (editingStyle == UITableViewCellEditingStyleDelete) { 71 | // Delete the row from the data source 72 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; 73 | } else if (editingStyle == UITableViewCellEditingStyleInsert) { 74 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view 75 | } 76 | } 77 | */ 78 | 79 | /* 80 | // Override to support rearranging the table view. 81 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { 82 | } 83 | */ 84 | 85 | /* 86 | // Override to support conditional rearranging of the table view. 87 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { 88 | // Return NO if you do not want the item to be re-orderable. 89 | return YES; 90 | } 91 | */ 92 | 93 | /* 94 | #pragma mark - Table view delegate 95 | 96 | // In a xib-based application, navigation from a table can be handled in -tableView:didSelectRowAtIndexPath: 97 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 98 | // Navigation logic may go here, for example: 99 | // Create the next view controller. 100 | <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:<#@"Nib name"#> bundle:nil]; 101 | 102 | // Pass the selected object to the new view controller. 103 | 104 | // Push the view controller. 105 | [self.navigationController pushViewController:detailViewController animated:YES]; 106 | } 107 | */ 108 | 109 | /* 110 | #pragma mark - Navigation 111 | 112 | // In a storyboard-based application, you will often want to do a little preparation before navigation 113 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 114 | // Get the new view controller using [segue destinationViewController]. 115 | // Pass the selected object to the new view controller. 116 | } 117 | */ 118 | 119 | @end 120 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/DemoTableViewController.xib: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/DemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoViewController.h 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DemoViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/DemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoViewController.m 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import "DemoViewController.h" 10 | #import "LXWaveProgressView.h" 11 | 12 | 13 | @interface DemoViewController () 14 | @property (nonatomic,strong)LXWaveProgressView *progressView; 15 | @end 16 | 17 | @implementation DemoViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | self.view.backgroundColor=[UIColor whiteColor]; 23 | 24 | self.progressView = [[LXWaveProgressView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; 25 | self.progressView.center=CGPointMake(CGRectGetMidX(self.view.bounds), 150); 26 | self.progressView.progress = 0.3; 27 | self.progressView.speed = 0.5; 28 | [self.view addSubview:self.progressView]; 29 | 30 | LXWaveProgressView *progressView1 = [[LXWaveProgressView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; 31 | progressView1.center=CGPointMake(CGRectGetMidX(self.view.bounds), 270); 32 | progressView1.progress = 0.5; 33 | progressView1.waveHeight = 10; 34 | progressView1.speed = 1.0; 35 | progressView1.isShowSingleWave=YES; 36 | progressView1.firstWaveColor = [UIColor colorWithRed:134/255.0 green:116/255.0 blue:210/255.0 alpha:1]; 37 | progressView1.secondWaveColor = [UIColor colorWithRed:134/255.0 green:116/255.0 blue:210/255.0 alpha:0.5]; 38 | [self.view addSubview:progressView1]; 39 | 40 | LXWaveProgressView *progressView2 = [[LXWaveProgressView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; 41 | progressView2.center=CGPointMake(CGRectGetMidX(self.view.bounds), 390); 42 | progressView2.progress = 0.7; 43 | progressView2.waveHeight = 5; 44 | progressView2.speed = 0.8; 45 | progressView2.firstWaveColor = [UIColor colorWithRed:134/255.0 green:216/255.0 blue:210/255.0 alpha:1]; 46 | progressView2.secondWaveColor = [UIColor colorWithRed:134/255.0 green:216/255.0 blue:210/255.0 alpha:0.5]; 47 | [self.view addSubview:progressView2]; 48 | } 49 | 50 | 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/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 | UIInterfaceOrientationLandscapeRight 37 | UIInterfaceOrientationLandscapeLeft 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/LXWaveProgressView/LXWaveProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LXWaveProgressView.h 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LXWaveProgressView : UIView 12 | /** 13 | * 进度 0-1 14 | */ 15 | @property (nonatomic,assign)CGFloat progress; 16 | 17 | /** 18 | * 波动速度,默认 1 19 | */ 20 | @property (nonatomic,assign)CGFloat speed; 21 | 22 | /** 23 | * 波纹填充颜色 24 | */ 25 | @property (nonatomic,strong)UIColor * firstWaveColor; 26 | @property (nonatomic,strong)UIColor * secondWaveColor; 27 | 28 | /** 29 | * 波动幅度,默认 5 30 | */ 31 | @property (nonatomic,assign)CGFloat waveHeight; 32 | 33 | /** 34 | * 进度文字 35 | */ 36 | @property (nonatomic,strong)UILabel * progressLabel; 37 | 38 | /** 39 | * 是否显示单层波浪,默认NO 40 | */ 41 | @property (nonatomic,assign)BOOL isShowSingleWave; 42 | @end 43 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/LXWaveProgressView/LXWaveProgressView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LXWaveProgressView.m 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #define LXDefaultFirstWaveColor [UIColor colorWithRed:34/255.0 green:116/255.0 blue:210/255.0 alpha:1] 10 | #define LXDefaultSecondWaveColor [UIColor colorWithRed:34/255.0 green:116/255.0 blue:210/255.0 alpha:0.3] 11 | //#define LXDefaultSecondWaveColor [UIColor colorWithRed:207/255.0 green:237/255.0 blue:255/255.0 alpha:1] 12 | 13 | #import "LXWaveProgressView.h" 14 | #import "YYWeakProxy.h" 15 | 16 | @interface LXWaveProgressView () 17 | @property (nonatomic,assign)CGFloat yHeight; 18 | @property (nonatomic,assign)CGFloat offset; 19 | @property (nonatomic,strong)CADisplayLink * timer; 20 | @property (nonatomic,strong)CAShapeLayer * firstWaveLayer; 21 | @property (nonatomic,strong)CAShapeLayer * secondWaveLayer; 22 | 23 | @end 24 | 25 | @implementation LXWaveProgressView 26 | 27 | - (instancetype)initWithFrame:(CGRect)frame 28 | { 29 | 30 | if (self = [super initWithFrame:frame]) { 31 | self.bounds = CGRectMake(0, 0, MIN(frame.size.width, frame.size.height), MIN(frame.size.width, frame.size.height)); 32 | self.layer.cornerRadius = MIN(frame.size.width, frame.size.height) * 0.5; 33 | self.layer.masksToBounds = YES; 34 | self.layer.borderColor = [UIColor colorWithRed:244/255.0 green:244/255.0 blue:248/255.0 alpha:1].CGColor; 35 | self.layer.borderWidth = 5.0f; 36 | 37 | self.waveHeight = 5.0; 38 | self.firstWaveColor = LXDefaultFirstWaveColor; 39 | self.secondWaveColor = LXDefaultSecondWaveColor; 40 | self.yHeight = self.bounds.size.height; 41 | self.speed=1.0; 42 | 43 | [self.layer addSublayer:self.firstWaveLayer]; 44 | if (!self.isShowSingleWave) { 45 | [self.layer addSublayer:self.secondWaveLayer]; 46 | } 47 | 48 | [self addSubview:self.progressLabel]; 49 | 50 | 51 | 52 | } 53 | return self; 54 | } 55 | 56 | 57 | 58 | -(void)setProgress:(CGFloat)progress 59 | { 60 | _progress = progress; 61 | _progressLabel.text = [NSString stringWithFormat:@"%ld%%",[[NSNumber numberWithFloat:progress * 100] integerValue]]; 62 | _progressLabel.textColor=[UIColor colorWithWhite:progress*1.8 alpha:1]; 63 | self.yHeight = self.bounds.size.height * (1 - progress); 64 | 65 | [self stopWaveAnimation]; 66 | [self startWaveAnimation]; 67 | } 68 | 69 | #pragma mark -- 开始波动动画 70 | - (void)startWaveAnimation 71 | { 72 | self.timer = [CADisplayLink displayLinkWithTarget:[YYWeakProxy proxyWithTarget:self] selector:@selector(waveAnimation)]; 73 | [self.timer addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; 74 | 75 | } 76 | 77 | 78 | #pragma mark -- 停止波动动画 79 | - (void)stopWaveAnimation 80 | { 81 | 82 | [self.timer invalidate]; 83 | self.timer = nil; 84 | } 85 | 86 | #pragma mark -- 波动动画实现 87 | - (void)waveAnimation 88 | { 89 | CGFloat waveHeight = self.waveHeight; 90 | if (self.progress == 0.0f || self.progress == 1.0f) { 91 | waveHeight = 0.f; 92 | } 93 | 94 | self.offset += self.speed; 95 | //第一个波纹 96 | CGMutablePathRef pathRef = CGPathCreateMutable(); 97 | CGFloat startOffY = waveHeight * sinf(self.offset * M_PI * 2 / self.bounds.size.width); 98 | CGFloat orignOffY = 0.0; 99 | CGPathMoveToPoint(pathRef, NULL, 0, startOffY); 100 | for (CGFloat i = 0.f; i <= self.bounds.size.width; i++) { 101 | orignOffY = waveHeight * sinf(2 * M_PI / self.bounds.size.width * i + self.offset * M_PI * 2 / self.bounds.size.width) + self.yHeight; 102 | CGPathAddLineToPoint(pathRef, NULL, i, orignOffY); 103 | } 104 | 105 | CGPathAddLineToPoint(pathRef, NULL, self.bounds.size.width, orignOffY); 106 | CGPathAddLineToPoint(pathRef, NULL, self.bounds.size.width, self.bounds.size.height); 107 | CGPathAddLineToPoint(pathRef, NULL, 0, self.bounds.size.height); 108 | CGPathAddLineToPoint(pathRef, NULL, 0, startOffY); 109 | CGPathCloseSubpath(pathRef); 110 | self.firstWaveLayer.path = pathRef; 111 | self.firstWaveLayer.fillColor = self.firstWaveColor.CGColor; 112 | CGPathRelease(pathRef); 113 | 114 | //第二个波纹 115 | if (!self.isShowSingleWave) { 116 | CGMutablePathRef pathRef1 = CGPathCreateMutable(); 117 | CGFloat startOffY1 = waveHeight * sinf(self.offset * M_PI * 2 / self.bounds.size.width); 118 | CGFloat orignOffY1 = 0.0; 119 | CGPathMoveToPoint(pathRef1, NULL, 0, startOffY1); 120 | for (CGFloat i = 0.f; i <= self.bounds.size.width; i++) { 121 | orignOffY1 = waveHeight * cosf(2 * M_PI / self.bounds.size.width * i + self.offset * M_PI * 2 / self.bounds.size.width) + self.yHeight; 122 | CGPathAddLineToPoint(pathRef1, NULL, i, orignOffY1); 123 | } 124 | 125 | CGPathAddLineToPoint(pathRef1, NULL, self.bounds.size.width, orignOffY1); 126 | CGPathAddLineToPoint(pathRef1, NULL, self.bounds.size.width, self.bounds.size.height); 127 | CGPathAddLineToPoint(pathRef1, NULL, 0, self.bounds.size.height); 128 | CGPathAddLineToPoint(pathRef1, NULL, 0, startOffY1); 129 | CGPathCloseSubpath(pathRef1); 130 | self.secondWaveLayer.path = pathRef1; 131 | self.secondWaveLayer.fillColor = self.secondWaveColor.CGColor; 132 | 133 | CGPathRelease(pathRef1); 134 | } 135 | 136 | } 137 | 138 | #pragma mark ----- INITUI ---- 139 | -(CAShapeLayer *)firstWaveLayer{ 140 | if (!_firstWaveLayer) { 141 | _firstWaveLayer = [CAShapeLayer layer]; 142 | _firstWaveLayer.frame = self.bounds; 143 | _firstWaveLayer.fillColor = _firstWaveColor.CGColor; 144 | } 145 | return _firstWaveLayer; 146 | } 147 | 148 | -(CAShapeLayer *)secondWaveLayer{ 149 | if (!_secondWaveLayer) { 150 | _secondWaveLayer = [CAShapeLayer layer]; 151 | _secondWaveLayer.frame = self.bounds; 152 | _secondWaveLayer.fillColor = _secondWaveColor.CGColor; 153 | } 154 | return _secondWaveLayer; 155 | } 156 | 157 | -(UILabel *)progressLabel{ 158 | if (!_progressLabel) { 159 | _progressLabel=[[UILabel alloc] init]; 160 | _progressLabel.text=@"0%"; 161 | _progressLabel.frame=CGRectMake(0, 0, self.bounds.size.width, 30); 162 | _progressLabel.center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); 163 | _progressLabel.font=[UIFont systemFontOfSize:20]; 164 | _progressLabel.textColor=[UIColor colorWithWhite:0 alpha:1]; 165 | _progressLabel.textAlignment=1; 166 | } 167 | return _progressLabel; 168 | } 169 | 170 | 171 | 172 | -(void)dealloc{ 173 | 174 | [self.timer invalidate]; 175 | self.timer = nil; 176 | 177 | if (_firstWaveLayer) { 178 | [_firstWaveLayer removeFromSuperlayer]; 179 | _firstWaveLayer = nil; 180 | } 181 | 182 | if (_secondWaveLayer) { 183 | [_secondWaveLayer removeFromSuperlayer]; 184 | _secondWaveLayer = nil; 185 | } 186 | } 187 | 188 | 189 | @end 190 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/LXWaveProgressView/YYWeakProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // YYWeakProxy.h 3 | // YYKit 4 | // 5 | // Created by ibireme on 14/10/18. 6 | // Copyright (c) 2015 ibireme. 7 | // 8 | // This source code is licensed under the MIT-style license found in the 9 | // LICENSE file in the root directory of this source tree. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | A proxy used to hold a weak object. 18 | It can be used to avoid retain cycles, such as the target in NSTimer or CADisplayLink. 19 | 20 | sample code: 21 | 22 | @implementation MyView { 23 | NSTimer *_timer; 24 | } 25 | 26 | - (void)initTimer { 27 | YYWeakProxy *proxy = [YYWeakProxy proxyWithTarget:self]; 28 | _timer = [NSTimer timerWithTimeInterval:0.1 target:proxy selector:@selector(tick:) userInfo:nil repeats:YES]; 29 | } 30 | 31 | - (void)tick:(NSTimer *)timer {...} 32 | @end 33 | */ 34 | @interface YYWeakProxy : NSProxy 35 | 36 | /** 37 | The proxy target. 38 | */ 39 | @property (nullable, nonatomic, weak, readonly) id target; 40 | 41 | /** 42 | Creates a new weak proxy for target. 43 | 44 | @param target Target object. 45 | 46 | @return A new proxy object. 47 | */ 48 | - (instancetype)initWithTarget:(id)target; 49 | 50 | /** 51 | Creates a new weak proxy for target. 52 | 53 | @param target Target object. 54 | 55 | @return A new proxy object. 56 | */ 57 | + (instancetype)proxyWithTarget:(id)target; 58 | 59 | @end 60 | 61 | NS_ASSUME_NONNULL_END 62 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/LXWaveProgressView/YYWeakProxy.m: -------------------------------------------------------------------------------- 1 | // 2 | // YYWeakProxy.m 3 | // YYKit 4 | // 5 | // Created by ibireme on 14/10/18. 6 | // Copyright (c) 2015 ibireme. 7 | // 8 | // This source code is licensed under the MIT-style license found in the 9 | // LICENSE file in the root directory of this source tree. 10 | // 11 | 12 | #import "YYWeakProxy.h" 13 | 14 | 15 | @implementation YYWeakProxy 16 | 17 | - (instancetype)initWithTarget:(id)target { 18 | _target = target; 19 | return self; 20 | } 21 | 22 | + (instancetype)proxyWithTarget:(id)target { 23 | return [[YYWeakProxy alloc] initWithTarget:target]; 24 | } 25 | 26 | - (id)forwardingTargetForSelector:(SEL)selector { 27 | return _target; 28 | } 29 | 30 | - (void)forwardInvocation:(NSInvocation *)invocation { 31 | void *null = NULL; 32 | [invocation setReturnValue:&null]; 33 | } 34 | 35 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { 36 | return [NSObject instanceMethodSignatureForSelector:@selector(init)]; 37 | } 38 | 39 | - (BOOL)respondsToSelector:(SEL)aSelector { 40 | return [_target respondsToSelector:aSelector]; 41 | } 42 | 43 | - (BOOL)isEqual:(id)object { 44 | return [_target isEqual:object]; 45 | } 46 | 47 | - (NSUInteger)hash { 48 | return [_target hash]; 49 | } 50 | 51 | - (Class)superclass { 52 | return [_target superclass]; 53 | } 54 | 55 | - (Class)class { 56 | return [_target class]; 57 | } 58 | 59 | - (BOOL)isKindOfClass:(Class)aClass { 60 | return [_target isKindOfClass:aClass]; 61 | } 62 | 63 | - (BOOL)isMemberOfClass:(Class)aClass { 64 | return [_target isMemberOfClass:aClass]; 65 | } 66 | 67 | - (BOOL)conformsToProtocol:(Protocol *)aProtocol { 68 | return [_target conformsToProtocol:aProtocol]; 69 | } 70 | 71 | - (BOOL)isProxy { 72 | return YES; 73 | } 74 | 75 | - (NSString *)description { 76 | return [_target description]; 77 | } 78 | 79 | - (NSString *)debugDescription { 80 | return [_target debugDescription]; 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "DemoViewController.h" 11 | #import "DemoTableViewController.h" 12 | 13 | @interface ViewController () 14 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 15 | 16 | @property (nonatomic,strong)NSArray *controlArray; 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | // Do any additional setup after loading the view, typically from a nib. 24 | self.controlArray=@[@"Demo1",@"Demo2"]; 25 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"]; 26 | 27 | 28 | 29 | } 30 | 31 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 32 | return self.controlArray.count; 33 | } 34 | 35 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 36 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath]; 37 | cell.textLabel.text=self.controlArray[indexPath.row]; 38 | return cell; 39 | } 40 | 41 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 42 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 43 | if (indexPath.row==0) { 44 | DemoViewController *vc=[[DemoViewController alloc] init]; 45 | [self.navigationController pushViewController:vc animated:YES]; 46 | }else if (indexPath.row==1){ 47 | DemoTableViewController *vc=[[DemoTableViewController alloc] init]; 48 | [self.navigationController pushViewController:vc animated:YES]; 49 | } 50 | } 51 | 52 | 53 | 54 | - (void)didReceiveMemoryWarning { 55 | [super didReceiveMemoryWarning]; 56 | // Dispose of any resources that can be recreated. 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/WaveTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // WaveTableViewCell.h 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class LXWaveProgressView; 12 | @interface WaveTableViewCell : UITableViewCell 13 | 14 | @property (nonatomic,strong)LXWaveProgressView *progressView; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/WaveTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // WaveTableViewCell.m 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import "WaveTableViewCell.h" 10 | #import "LXWaveProgressView.h" 11 | 12 | 13 | @implementation WaveTableViewCell 14 | 15 | -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 16 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 17 | 18 | [self.contentView addSubview:self.progressView]; 19 | } 20 | return self; 21 | } 22 | 23 | -(LXWaveProgressView *)progressView{ 24 | if (!_progressView) { 25 | _progressView =[[LXWaveProgressView alloc] initWithFrame:CGRectMake(100, 10, 80, 80)]; 26 | _progressView.firstWaveColor = [UIColor colorWithRed:134/255.0 green:116/255.0 blue:210/255.0 alpha:1]; 27 | _progressView.secondWaveColor = [UIColor colorWithRed:134/255.0 green:116/255.0 blue:210/255.0 alpha:0.5]; 28 | } 29 | return _progressView; 30 | } 31 | 32 | - (void)awakeFromNib { 33 | [super awakeFromNib]; 34 | // Initialization code 35 | } 36 | 37 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 38 | [super setSelected:selected animated:animated]; 39 | 40 | // Configure the view for the selected state 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /LXWaveProgressDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LXWaveProgressDemo 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. 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 | -------------------------------------------------------------------------------- /LXWaveProgressDemoTests/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 | -------------------------------------------------------------------------------- /LXWaveProgressDemoTests/LXWaveProgressDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LXWaveProgressDemoTests.m 3 | // LXWaveProgressDemoTests 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LXWaveProgressDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LXWaveProgressDemoTests 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 | -------------------------------------------------------------------------------- /LXWaveProgressDemoUITests/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 | -------------------------------------------------------------------------------- /LXWaveProgressDemoUITests/LXWaveProgressDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LXWaveProgressDemoUITests.m 3 | // LXWaveProgressDemoUITests 4 | // 5 | // Created by liuxin on 16/8/1. 6 | // Copyright © 2016年 liuxin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LXWaveProgressDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LXWaveProgressDemoUITests 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LXWaveProgress 2 | A simple wave components
3 | ###一个简单的波浪进度动画,高度可定制。具体效果见Demo。 4 | ![](http://i2.piimg.com/4851/73b4f6a476b5a56b.gif) 5 | 6 | ######使用方法 7 | ``` 8 | LXWaveProgressView *progressView1 = [[LXWaveProgressView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; 9 | progressView1.center=CGPointMake(CGRectGetMidX(self.view.bounds), 270); 10 | progressView1.progress = 0.5; 11 | progressView1.waveHeight = 10; 12 | progressView1.speed = 1.0; 13 | progressView1.isShowSingleWave=YES; 14 | progressView1.firstWaveColor = [UIColor colorWithRed:134/255.0 green:116/255.0 blue:210/255.0 alpha:1]; 15 | progressView1.secondWaveColor = [UIColor colorWithRed:134/255.0 green:116/255.0 blue:210/255.0 alpha:0.5]; 16 | [self.view addSubview:progressView1]; 17 | ``` 18 | 欢迎star,有任何问题可以联系我。
19 | [Demo地址](https://github.com/xinge1/LXWaveProgress)
20 | [博客地址](http://www.jianshu.com/p/0327ea46d1bc) 21 | --------------------------------------------------------------------------------