├── .DS_Store ├── MLMProgressView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── my.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── my.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── MLMProgressView.xcscheme │ └── xcschememanagement.plist ├── MLMProgressView ├── .DS_Store ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── CalibrationViewController.h ├── CalibrationViewController.m ├── Info.plist ├── MLMProgress │ ├── .DS_Store │ ├── Help │ │ ├── .DS_Store │ │ ├── UIView+Extensions.h │ │ ├── UIView+Extensions.m │ │ ├── UIView+TapAction.h │ │ └── UIView+TapAction.m │ ├── instrument │ │ ├── MLMProgressHeader.h │ │ ├── MLMProgressView.h │ │ ├── MLMProgressView.m │ │ ├── blueDot.png │ │ ├── brightDot.png │ │ ├── calibration │ │ │ ├── MLMCalibrationView.h │ │ │ └── MLMCalibrationView.m │ │ ├── circle │ │ │ ├── MLMCircleView.h │ │ │ └── MLMCircleView.m │ │ └── redDot.png │ ├── statistical │ │ ├── .DS_Store │ │ ├── MLMStatisticalView.h │ │ └── MLMStatisticalView.m │ └── waterWave │ │ ├── MLMWaveWaterView.h │ │ ├── MLMWaveWaterView.m │ │ ├── UIView+MLMBorderPath.h │ │ └── UIView+MLMBorderPath.m ├── MainTableViewController.h ├── MainTableViewController.m ├── ProgressViewController.h ├── ProgressViewController.m ├── StatisticalVC.h ├── StatisticalVC.m ├── TotalProgressVC.h ├── TotalProgressVC.m ├── WaterWaveVC.h ├── WaterWaveVC.m ├── WaterWaveVC.xib └── main.m ├── MLMProgressViewTests ├── Info.plist └── MLMProgressViewTests.m ├── MLMProgressViewUITests ├── Info.plist └── MLMProgressViewUITests.m ├── README.md ├── Statistical.png ├── instrument.gif └── waterWave.gif /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/.DS_Store -------------------------------------------------------------------------------- /MLMProgressView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0F11FE771D5AFA6400AF2BB2 /* TotalProgressVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F11FE761D5AFA6400AF2BB2 /* TotalProgressVC.m */; }; 11 | 0F11FE7D1D5B2C5200AF2BB2 /* UIView+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F11FE7A1D5B2C5200AF2BB2 /* UIView+Extensions.m */; }; 12 | 0F11FE7E1D5B2C5200AF2BB2 /* UIView+TapAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F11FE7C1D5B2C5200AF2BB2 /* UIView+TapAction.m */; }; 13 | 0F1CD5871D52CE36001A1047 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1CD5861D52CE36001A1047 /* main.m */; }; 14 | 0F1CD58A1D52CE36001A1047 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1CD5891D52CE36001A1047 /* AppDelegate.m */; }; 15 | 0F1CD5921D52CE36001A1047 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0F1CD5911D52CE36001A1047 /* Assets.xcassets */; }; 16 | 0F1CD5951D52CE36001A1047 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F1CD5931D52CE36001A1047 /* LaunchScreen.storyboard */; }; 17 | 0F1CD5A01D52CE37001A1047 /* MLMProgressViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1CD59F1D52CE37001A1047 /* MLMProgressViewTests.m */; }; 18 | 0F1CD5AB1D52CE37001A1047 /* MLMProgressViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1CD5AA1D52CE37001A1047 /* MLMProgressViewUITests.m */; }; 19 | 0F1CD5BF1D52CEE7001A1047 /* MainTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1CD5BE1D52CEE7001A1047 /* MainTableViewController.m */; }; 20 | 0F1CD5C41D52D0E2001A1047 /* ProgressViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1CD5C21D52D0E2001A1047 /* ProgressViewController.m */; }; 21 | 0F1CD5E81D532B34001A1047 /* CalibrationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1CD5E71D532B34001A1047 /* CalibrationViewController.m */; }; 22 | 0F52017A1DD48521007EC95F /* MLMWaveWaterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F5201791DD48521007EC95F /* MLMWaveWaterView.m */; }; 23 | 0F52017F1DD48593007EC95F /* WaterWaveVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F52017D1DD48593007EC95F /* WaterWaveVC.m */; }; 24 | 0F5201801DD48593007EC95F /* WaterWaveVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0F52017E1DD48593007EC95F /* WaterWaveVC.xib */; }; 25 | 0F6C2FE71D7FF8BD007F217A /* MLMStatisticalView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F6C2FE61D7FF8BD007F217A /* MLMStatisticalView.m */; }; 26 | 0F6C2FEB1D7FF979007F217A /* StatisticalVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F6C2FEA1D7FF979007F217A /* StatisticalVC.m */; }; 27 | 0F9DD2031DD55AF90036CE26 /* MLMCalibrationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F9DD1FC1DD55AF90036CE26 /* MLMCalibrationView.m */; }; 28 | 0F9DD2041DD55AF90036CE26 /* MLMCircleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F9DD1FF1DD55AF90036CE26 /* MLMCircleView.m */; }; 29 | 0F9DD2051DD55AF90036CE26 /* MLMProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F9DD2021DD55AF90036CE26 /* MLMProgressView.m */; }; 30 | 0F9DD2091DD55B250036CE26 /* blueDot.png in Resources */ = {isa = PBXBuildFile; fileRef = 0F9DD2061DD55B250036CE26 /* blueDot.png */; }; 31 | 0F9DD20A1DD55B250036CE26 /* brightDot.png in Resources */ = {isa = PBXBuildFile; fileRef = 0F9DD2071DD55B250036CE26 /* brightDot.png */; }; 32 | 0F9DD20B1DD55B250036CE26 /* redDot.png in Resources */ = {isa = PBXBuildFile; fileRef = 0F9DD2081DD55B250036CE26 /* redDot.png */; }; 33 | 0FD6E5791DDD859D00C6F923 /* UIView+MLMBorderPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FD6E5781DDD859D00C6F923 /* UIView+MLMBorderPath.m */; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXContainerItemProxy section */ 37 | 0F1CD59C1D52CE37001A1047 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 0F1CD57A1D52CE36001A1047 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 0F1CD5811D52CE36001A1047; 42 | remoteInfo = MLMProgressView; 43 | }; 44 | 0F1CD5A71D52CE37001A1047 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 0F1CD57A1D52CE36001A1047 /* Project object */; 47 | proxyType = 1; 48 | remoteGlobalIDString = 0F1CD5811D52CE36001A1047; 49 | remoteInfo = MLMProgressView; 50 | }; 51 | /* End PBXContainerItemProxy section */ 52 | 53 | /* Begin PBXFileReference section */ 54 | 0F11FE751D5AFA6400AF2BB2 /* TotalProgressVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TotalProgressVC.h; sourceTree = ""; }; 55 | 0F11FE761D5AFA6400AF2BB2 /* TotalProgressVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TotalProgressVC.m; sourceTree = ""; }; 56 | 0F11FE791D5B2C5200AF2BB2 /* UIView+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Extensions.h"; sourceTree = ""; }; 57 | 0F11FE7A1D5B2C5200AF2BB2 /* UIView+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extensions.m"; sourceTree = ""; }; 58 | 0F11FE7B1D5B2C5200AF2BB2 /* UIView+TapAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+TapAction.h"; sourceTree = ""; }; 59 | 0F11FE7C1D5B2C5200AF2BB2 /* UIView+TapAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+TapAction.m"; sourceTree = ""; }; 60 | 0F1CD5821D52CE36001A1047 /* MLMProgressView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MLMProgressView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | 0F1CD5861D52CE36001A1047 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 62 | 0F1CD5881D52CE36001A1047 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 63 | 0F1CD5891D52CE36001A1047 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 64 | 0F1CD5911D52CE36001A1047 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 65 | 0F1CD5941D52CE36001A1047 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 66 | 0F1CD5961D52CE36001A1047 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | 0F1CD59B1D52CE37001A1047 /* MLMProgressViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MLMProgressViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | 0F1CD59F1D52CE37001A1047 /* MLMProgressViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MLMProgressViewTests.m; sourceTree = ""; }; 69 | 0F1CD5A11D52CE37001A1047 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 70 | 0F1CD5A61D52CE37001A1047 /* MLMProgressViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MLMProgressViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | 0F1CD5AA1D52CE37001A1047 /* MLMProgressViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MLMProgressViewUITests.m; sourceTree = ""; }; 72 | 0F1CD5AC1D52CE37001A1047 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 73 | 0F1CD5BD1D52CEE7001A1047 /* MainTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainTableViewController.h; sourceTree = ""; }; 74 | 0F1CD5BE1D52CEE7001A1047 /* MainTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainTableViewController.m; sourceTree = ""; }; 75 | 0F1CD5C11D52D0E2001A1047 /* ProgressViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgressViewController.h; sourceTree = ""; }; 76 | 0F1CD5C21D52D0E2001A1047 /* ProgressViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProgressViewController.m; sourceTree = ""; }; 77 | 0F1CD5E61D532B34001A1047 /* CalibrationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalibrationViewController.h; sourceTree = ""; }; 78 | 0F1CD5E71D532B34001A1047 /* CalibrationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalibrationViewController.m; sourceTree = ""; }; 79 | 0F5201781DD48521007EC95F /* MLMWaveWaterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLMWaveWaterView.h; sourceTree = ""; }; 80 | 0F5201791DD48521007EC95F /* MLMWaveWaterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLMWaveWaterView.m; sourceTree = ""; }; 81 | 0F52017C1DD48593007EC95F /* WaterWaveVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaterWaveVC.h; sourceTree = ""; }; 82 | 0F52017D1DD48593007EC95F /* WaterWaveVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaterWaveVC.m; sourceTree = ""; }; 83 | 0F52017E1DD48593007EC95F /* WaterWaveVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WaterWaveVC.xib; sourceTree = ""; }; 84 | 0F6C2FE51D7FF8BD007F217A /* MLMStatisticalView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLMStatisticalView.h; sourceTree = ""; }; 85 | 0F6C2FE61D7FF8BD007F217A /* MLMStatisticalView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLMStatisticalView.m; sourceTree = ""; }; 86 | 0F6C2FE91D7FF979007F217A /* StatisticalVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatisticalVC.h; sourceTree = ""; }; 87 | 0F6C2FEA1D7FF979007F217A /* StatisticalVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StatisticalVC.m; sourceTree = ""; }; 88 | 0F9DD1FB1DD55AF90036CE26 /* MLMCalibrationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLMCalibrationView.h; sourceTree = ""; }; 89 | 0F9DD1FC1DD55AF90036CE26 /* MLMCalibrationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLMCalibrationView.m; sourceTree = ""; }; 90 | 0F9DD1FE1DD55AF90036CE26 /* MLMCircleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLMCircleView.h; sourceTree = ""; }; 91 | 0F9DD1FF1DD55AF90036CE26 /* MLMCircleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLMCircleView.m; sourceTree = ""; }; 92 | 0F9DD2001DD55AF90036CE26 /* MLMProgressHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MLMProgressHeader.h; path = instrument/MLMProgressHeader.h; sourceTree = ""; }; 93 | 0F9DD2011DD55AF90036CE26 /* MLMProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLMProgressView.h; sourceTree = ""; }; 94 | 0F9DD2021DD55AF90036CE26 /* MLMProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLMProgressView.m; sourceTree = ""; }; 95 | 0F9DD2061DD55B250036CE26 /* blueDot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blueDot.png; sourceTree = ""; }; 96 | 0F9DD2071DD55B250036CE26 /* brightDot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = brightDot.png; sourceTree = ""; }; 97 | 0F9DD2081DD55B250036CE26 /* redDot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = redDot.png; sourceTree = ""; }; 98 | 0FD6E5771DDD859D00C6F923 /* UIView+MLMBorderPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MLMBorderPath.h"; sourceTree = ""; }; 99 | 0FD6E5781DDD859D00C6F923 /* UIView+MLMBorderPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MLMBorderPath.m"; sourceTree = ""; }; 100 | /* End PBXFileReference section */ 101 | 102 | /* Begin PBXFrameworksBuildPhase section */ 103 | 0F1CD57F1D52CE36001A1047 /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | 0F1CD5981D52CE37001A1047 /* Frameworks */ = { 111 | isa = PBXFrameworksBuildPhase; 112 | buildActionMask = 2147483647; 113 | files = ( 114 | ); 115 | runOnlyForDeploymentPostprocessing = 0; 116 | }; 117 | 0F1CD5A31D52CE37001A1047 /* Frameworks */ = { 118 | isa = PBXFrameworksBuildPhase; 119 | buildActionMask = 2147483647; 120 | files = ( 121 | ); 122 | runOnlyForDeploymentPostprocessing = 0; 123 | }; 124 | /* End PBXFrameworksBuildPhase section */ 125 | 126 | /* Begin PBXGroup section */ 127 | 0F11FE741D5AFA0B00AF2BB2 /* TotalProgressVC */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 0F11FE751D5AFA6400AF2BB2 /* TotalProgressVC.h */, 131 | 0F11FE761D5AFA6400AF2BB2 /* TotalProgressVC.m */, 132 | ); 133 | name = TotalProgressVC; 134 | sourceTree = ""; 135 | }; 136 | 0F11FE781D5B2C5200AF2BB2 /* Help */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 0F11FE791D5B2C5200AF2BB2 /* UIView+Extensions.h */, 140 | 0F11FE7A1D5B2C5200AF2BB2 /* UIView+Extensions.m */, 141 | 0F11FE7B1D5B2C5200AF2BB2 /* UIView+TapAction.h */, 142 | 0F11FE7C1D5B2C5200AF2BB2 /* UIView+TapAction.m */, 143 | ); 144 | path = Help; 145 | sourceTree = ""; 146 | }; 147 | 0F1CD5791D52CE36001A1047 = { 148 | isa = PBXGroup; 149 | children = ( 150 | 0F1CD5841D52CE36001A1047 /* MLMProgressView */, 151 | 0F1CD59E1D52CE37001A1047 /* MLMProgressViewTests */, 152 | 0F1CD5A91D52CE37001A1047 /* MLMProgressViewUITests */, 153 | 0F1CD5831D52CE36001A1047 /* Products */, 154 | ); 155 | sourceTree = ""; 156 | }; 157 | 0F1CD5831D52CE36001A1047 /* Products */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 0F1CD5821D52CE36001A1047 /* MLMProgressView.app */, 161 | 0F1CD59B1D52CE37001A1047 /* MLMProgressViewTests.xctest */, 162 | 0F1CD5A61D52CE37001A1047 /* MLMProgressViewUITests.xctest */, 163 | ); 164 | name = Products; 165 | sourceTree = ""; 166 | }; 167 | 0F1CD5841D52CE36001A1047 /* MLMProgressView */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 0F1CD5C61D52D136001A1047 /* MLMProgress */, 171 | 0F6C2FE81D7FF964007F217A /* StatisticalVC */, 172 | 0F11FE741D5AFA0B00AF2BB2 /* TotalProgressVC */, 173 | 0F1CD5C01D52D0B0001A1047 /* ProgressVC */, 174 | 0F1CD5E51D532B1A001A1047 /* CalibrationVC */, 175 | 0F52017B1DD48535007EC95F /* WaterWaveVC */, 176 | 0F1CD5B91D52CE79001A1047 /* MainVC */, 177 | 0F1CD5B81D52CE6B001A1047 /* Appdelegate */, 178 | 0F1CD5911D52CE36001A1047 /* Assets.xcassets */, 179 | 0F1CD5931D52CE36001A1047 /* LaunchScreen.storyboard */, 180 | 0F1CD5961D52CE36001A1047 /* Info.plist */, 181 | 0F1CD5851D52CE36001A1047 /* Supporting Files */, 182 | ); 183 | path = MLMProgressView; 184 | sourceTree = ""; 185 | }; 186 | 0F1CD5851D52CE36001A1047 /* Supporting Files */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 0F1CD5861D52CE36001A1047 /* main.m */, 190 | ); 191 | name = "Supporting Files"; 192 | sourceTree = ""; 193 | }; 194 | 0F1CD59E1D52CE37001A1047 /* MLMProgressViewTests */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | 0F1CD59F1D52CE37001A1047 /* MLMProgressViewTests.m */, 198 | 0F1CD5A11D52CE37001A1047 /* Info.plist */, 199 | ); 200 | path = MLMProgressViewTests; 201 | sourceTree = ""; 202 | }; 203 | 0F1CD5A91D52CE37001A1047 /* MLMProgressViewUITests */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 0F1CD5AA1D52CE37001A1047 /* MLMProgressViewUITests.m */, 207 | 0F1CD5AC1D52CE37001A1047 /* Info.plist */, 208 | ); 209 | path = MLMProgressViewUITests; 210 | sourceTree = ""; 211 | }; 212 | 0F1CD5B81D52CE6B001A1047 /* Appdelegate */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | 0F1CD5881D52CE36001A1047 /* AppDelegate.h */, 216 | 0F1CD5891D52CE36001A1047 /* AppDelegate.m */, 217 | ); 218 | name = Appdelegate; 219 | sourceTree = ""; 220 | }; 221 | 0F1CD5B91D52CE79001A1047 /* MainVC */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | 0F1CD5BD1D52CEE7001A1047 /* MainTableViewController.h */, 225 | 0F1CD5BE1D52CEE7001A1047 /* MainTableViewController.m */, 226 | ); 227 | name = MainVC; 228 | sourceTree = ""; 229 | }; 230 | 0F1CD5C01D52D0B0001A1047 /* ProgressVC */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | 0F1CD5C11D52D0E2001A1047 /* ProgressViewController.h */, 234 | 0F1CD5C21D52D0E2001A1047 /* ProgressViewController.m */, 235 | ); 236 | name = ProgressVC; 237 | sourceTree = ""; 238 | }; 239 | 0F1CD5C61D52D136001A1047 /* MLMProgress */ = { 240 | isa = PBXGroup; 241 | children = ( 242 | 0F9DD2001DD55AF90036CE26 /* MLMProgressHeader.h */, 243 | 0F9DD1F91DD55AF90036CE26 /* instrument */, 244 | 0F5201771DD48516007EC95F /* waterWave */, 245 | 0F6C2FE41D7FF8BD007F217A /* statistical */, 246 | 0F11FE781D5B2C5200AF2BB2 /* Help */, 247 | ); 248 | path = MLMProgress; 249 | sourceTree = ""; 250 | }; 251 | 0F1CD5E51D532B1A001A1047 /* CalibrationVC */ = { 252 | isa = PBXGroup; 253 | children = ( 254 | 0F1CD5E61D532B34001A1047 /* CalibrationViewController.h */, 255 | 0F1CD5E71D532B34001A1047 /* CalibrationViewController.m */, 256 | ); 257 | name = CalibrationVC; 258 | sourceTree = ""; 259 | }; 260 | 0F5201771DD48516007EC95F /* waterWave */ = { 261 | isa = PBXGroup; 262 | children = ( 263 | 0FD6E5771DDD859D00C6F923 /* UIView+MLMBorderPath.h */, 264 | 0FD6E5781DDD859D00C6F923 /* UIView+MLMBorderPath.m */, 265 | 0F5201781DD48521007EC95F /* MLMWaveWaterView.h */, 266 | 0F5201791DD48521007EC95F /* MLMWaveWaterView.m */, 267 | ); 268 | path = waterWave; 269 | sourceTree = ""; 270 | }; 271 | 0F52017B1DD48535007EC95F /* WaterWaveVC */ = { 272 | isa = PBXGroup; 273 | children = ( 274 | 0F52017C1DD48593007EC95F /* WaterWaveVC.h */, 275 | 0F52017D1DD48593007EC95F /* WaterWaveVC.m */, 276 | 0F52017E1DD48593007EC95F /* WaterWaveVC.xib */, 277 | ); 278 | name = WaterWaveVC; 279 | sourceTree = ""; 280 | }; 281 | 0F6C2FE41D7FF8BD007F217A /* statistical */ = { 282 | isa = PBXGroup; 283 | children = ( 284 | 0F6C2FE51D7FF8BD007F217A /* MLMStatisticalView.h */, 285 | 0F6C2FE61D7FF8BD007F217A /* MLMStatisticalView.m */, 286 | ); 287 | path = statistical; 288 | sourceTree = ""; 289 | }; 290 | 0F6C2FE81D7FF964007F217A /* StatisticalVC */ = { 291 | isa = PBXGroup; 292 | children = ( 293 | 0F6C2FE91D7FF979007F217A /* StatisticalVC.h */, 294 | 0F6C2FEA1D7FF979007F217A /* StatisticalVC.m */, 295 | ); 296 | name = StatisticalVC; 297 | sourceTree = ""; 298 | }; 299 | 0F9DD1F91DD55AF90036CE26 /* instrument */ = { 300 | isa = PBXGroup; 301 | children = ( 302 | 0F9DD2061DD55B250036CE26 /* blueDot.png */, 303 | 0F9DD2071DD55B250036CE26 /* brightDot.png */, 304 | 0F9DD2081DD55B250036CE26 /* redDot.png */, 305 | 0F9DD2011DD55AF90036CE26 /* MLMProgressView.h */, 306 | 0F9DD2021DD55AF90036CE26 /* MLMProgressView.m */, 307 | 0F9DD1FA1DD55AF90036CE26 /* calibration */, 308 | 0F9DD1FD1DD55AF90036CE26 /* circle */, 309 | ); 310 | path = instrument; 311 | sourceTree = ""; 312 | }; 313 | 0F9DD1FA1DD55AF90036CE26 /* calibration */ = { 314 | isa = PBXGroup; 315 | children = ( 316 | 0F9DD1FB1DD55AF90036CE26 /* MLMCalibrationView.h */, 317 | 0F9DD1FC1DD55AF90036CE26 /* MLMCalibrationView.m */, 318 | ); 319 | path = calibration; 320 | sourceTree = ""; 321 | }; 322 | 0F9DD1FD1DD55AF90036CE26 /* circle */ = { 323 | isa = PBXGroup; 324 | children = ( 325 | 0F9DD1FE1DD55AF90036CE26 /* MLMCircleView.h */, 326 | 0F9DD1FF1DD55AF90036CE26 /* MLMCircleView.m */, 327 | ); 328 | path = circle; 329 | sourceTree = ""; 330 | }; 331 | /* End PBXGroup section */ 332 | 333 | /* Begin PBXNativeTarget section */ 334 | 0F1CD5811D52CE36001A1047 /* MLMProgressView */ = { 335 | isa = PBXNativeTarget; 336 | buildConfigurationList = 0F1CD5AF1D52CE37001A1047 /* Build configuration list for PBXNativeTarget "MLMProgressView" */; 337 | buildPhases = ( 338 | 0F1CD57E1D52CE36001A1047 /* Sources */, 339 | 0F1CD57F1D52CE36001A1047 /* Frameworks */, 340 | 0F1CD5801D52CE36001A1047 /* Resources */, 341 | ); 342 | buildRules = ( 343 | ); 344 | dependencies = ( 345 | ); 346 | name = MLMProgressView; 347 | productName = MLMProgressView; 348 | productReference = 0F1CD5821D52CE36001A1047 /* MLMProgressView.app */; 349 | productType = "com.apple.product-type.application"; 350 | }; 351 | 0F1CD59A1D52CE37001A1047 /* MLMProgressViewTests */ = { 352 | isa = PBXNativeTarget; 353 | buildConfigurationList = 0F1CD5B21D52CE37001A1047 /* Build configuration list for PBXNativeTarget "MLMProgressViewTests" */; 354 | buildPhases = ( 355 | 0F1CD5971D52CE37001A1047 /* Sources */, 356 | 0F1CD5981D52CE37001A1047 /* Frameworks */, 357 | 0F1CD5991D52CE37001A1047 /* Resources */, 358 | ); 359 | buildRules = ( 360 | ); 361 | dependencies = ( 362 | 0F1CD59D1D52CE37001A1047 /* PBXTargetDependency */, 363 | ); 364 | name = MLMProgressViewTests; 365 | productName = MLMProgressViewTests; 366 | productReference = 0F1CD59B1D52CE37001A1047 /* MLMProgressViewTests.xctest */; 367 | productType = "com.apple.product-type.bundle.unit-test"; 368 | }; 369 | 0F1CD5A51D52CE37001A1047 /* MLMProgressViewUITests */ = { 370 | isa = PBXNativeTarget; 371 | buildConfigurationList = 0F1CD5B51D52CE37001A1047 /* Build configuration list for PBXNativeTarget "MLMProgressViewUITests" */; 372 | buildPhases = ( 373 | 0F1CD5A21D52CE37001A1047 /* Sources */, 374 | 0F1CD5A31D52CE37001A1047 /* Frameworks */, 375 | 0F1CD5A41D52CE37001A1047 /* Resources */, 376 | ); 377 | buildRules = ( 378 | ); 379 | dependencies = ( 380 | 0F1CD5A81D52CE37001A1047 /* PBXTargetDependency */, 381 | ); 382 | name = MLMProgressViewUITests; 383 | productName = MLMProgressViewUITests; 384 | productReference = 0F1CD5A61D52CE37001A1047 /* MLMProgressViewUITests.xctest */; 385 | productType = "com.apple.product-type.bundle.ui-testing"; 386 | }; 387 | /* End PBXNativeTarget section */ 388 | 389 | /* Begin PBXProject section */ 390 | 0F1CD57A1D52CE36001A1047 /* Project object */ = { 391 | isa = PBXProject; 392 | attributes = { 393 | LastUpgradeCheck = 0720; 394 | ORGANIZATIONNAME = MS; 395 | TargetAttributes = { 396 | 0F1CD5811D52CE36001A1047 = { 397 | CreatedOnToolsVersion = 7.2.1; 398 | DevelopmentTeam = 5MEUQ98276; 399 | }; 400 | 0F1CD59A1D52CE37001A1047 = { 401 | CreatedOnToolsVersion = 7.2.1; 402 | TestTargetID = 0F1CD5811D52CE36001A1047; 403 | }; 404 | 0F1CD5A51D52CE37001A1047 = { 405 | CreatedOnToolsVersion = 7.2.1; 406 | TestTargetID = 0F1CD5811D52CE36001A1047; 407 | }; 408 | }; 409 | }; 410 | buildConfigurationList = 0F1CD57D1D52CE36001A1047 /* Build configuration list for PBXProject "MLMProgressView" */; 411 | compatibilityVersion = "Xcode 3.2"; 412 | developmentRegion = English; 413 | hasScannedForEncodings = 0; 414 | knownRegions = ( 415 | en, 416 | Base, 417 | ); 418 | mainGroup = 0F1CD5791D52CE36001A1047; 419 | productRefGroup = 0F1CD5831D52CE36001A1047 /* Products */; 420 | projectDirPath = ""; 421 | projectRoot = ""; 422 | targets = ( 423 | 0F1CD5811D52CE36001A1047 /* MLMProgressView */, 424 | 0F1CD59A1D52CE37001A1047 /* MLMProgressViewTests */, 425 | 0F1CD5A51D52CE37001A1047 /* MLMProgressViewUITests */, 426 | ); 427 | }; 428 | /* End PBXProject section */ 429 | 430 | /* Begin PBXResourcesBuildPhase section */ 431 | 0F1CD5801D52CE36001A1047 /* Resources */ = { 432 | isa = PBXResourcesBuildPhase; 433 | buildActionMask = 2147483647; 434 | files = ( 435 | 0F1CD5951D52CE36001A1047 /* LaunchScreen.storyboard in Resources */, 436 | 0F9DD2091DD55B250036CE26 /* blueDot.png in Resources */, 437 | 0F5201801DD48593007EC95F /* WaterWaveVC.xib in Resources */, 438 | 0F9DD20B1DD55B250036CE26 /* redDot.png in Resources */, 439 | 0F1CD5921D52CE36001A1047 /* Assets.xcassets in Resources */, 440 | 0F9DD20A1DD55B250036CE26 /* brightDot.png in Resources */, 441 | ); 442 | runOnlyForDeploymentPostprocessing = 0; 443 | }; 444 | 0F1CD5991D52CE37001A1047 /* Resources */ = { 445 | isa = PBXResourcesBuildPhase; 446 | buildActionMask = 2147483647; 447 | files = ( 448 | ); 449 | runOnlyForDeploymentPostprocessing = 0; 450 | }; 451 | 0F1CD5A41D52CE37001A1047 /* Resources */ = { 452 | isa = PBXResourcesBuildPhase; 453 | buildActionMask = 2147483647; 454 | files = ( 455 | ); 456 | runOnlyForDeploymentPostprocessing = 0; 457 | }; 458 | /* End PBXResourcesBuildPhase section */ 459 | 460 | /* Begin PBXSourcesBuildPhase section */ 461 | 0F1CD57E1D52CE36001A1047 /* Sources */ = { 462 | isa = PBXSourcesBuildPhase; 463 | buildActionMask = 2147483647; 464 | files = ( 465 | 0F1CD5E81D532B34001A1047 /* CalibrationViewController.m in Sources */, 466 | 0F1CD58A1D52CE36001A1047 /* AppDelegate.m in Sources */, 467 | 0F9DD2031DD55AF90036CE26 /* MLMCalibrationView.m in Sources */, 468 | 0F6C2FEB1D7FF979007F217A /* StatisticalVC.m in Sources */, 469 | 0F52017A1DD48521007EC95F /* MLMWaveWaterView.m in Sources */, 470 | 0F11FE7D1D5B2C5200AF2BB2 /* UIView+Extensions.m in Sources */, 471 | 0FD6E5791DDD859D00C6F923 /* UIView+MLMBorderPath.m in Sources */, 472 | 0F1CD5871D52CE36001A1047 /* main.m in Sources */, 473 | 0F1CD5BF1D52CEE7001A1047 /* MainTableViewController.m in Sources */, 474 | 0F11FE771D5AFA6400AF2BB2 /* TotalProgressVC.m in Sources */, 475 | 0F6C2FE71D7FF8BD007F217A /* MLMStatisticalView.m in Sources */, 476 | 0F1CD5C41D52D0E2001A1047 /* ProgressViewController.m in Sources */, 477 | 0F9DD2051DD55AF90036CE26 /* MLMProgressView.m in Sources */, 478 | 0F9DD2041DD55AF90036CE26 /* MLMCircleView.m in Sources */, 479 | 0F11FE7E1D5B2C5200AF2BB2 /* UIView+TapAction.m in Sources */, 480 | 0F52017F1DD48593007EC95F /* WaterWaveVC.m in Sources */, 481 | ); 482 | runOnlyForDeploymentPostprocessing = 0; 483 | }; 484 | 0F1CD5971D52CE37001A1047 /* Sources */ = { 485 | isa = PBXSourcesBuildPhase; 486 | buildActionMask = 2147483647; 487 | files = ( 488 | 0F1CD5A01D52CE37001A1047 /* MLMProgressViewTests.m in Sources */, 489 | ); 490 | runOnlyForDeploymentPostprocessing = 0; 491 | }; 492 | 0F1CD5A21D52CE37001A1047 /* Sources */ = { 493 | isa = PBXSourcesBuildPhase; 494 | buildActionMask = 2147483647; 495 | files = ( 496 | 0F1CD5AB1D52CE37001A1047 /* MLMProgressViewUITests.m in Sources */, 497 | ); 498 | runOnlyForDeploymentPostprocessing = 0; 499 | }; 500 | /* End PBXSourcesBuildPhase section */ 501 | 502 | /* Begin PBXTargetDependency section */ 503 | 0F1CD59D1D52CE37001A1047 /* PBXTargetDependency */ = { 504 | isa = PBXTargetDependency; 505 | target = 0F1CD5811D52CE36001A1047 /* MLMProgressView */; 506 | targetProxy = 0F1CD59C1D52CE37001A1047 /* PBXContainerItemProxy */; 507 | }; 508 | 0F1CD5A81D52CE37001A1047 /* PBXTargetDependency */ = { 509 | isa = PBXTargetDependency; 510 | target = 0F1CD5811D52CE36001A1047 /* MLMProgressView */; 511 | targetProxy = 0F1CD5A71D52CE37001A1047 /* PBXContainerItemProxy */; 512 | }; 513 | /* End PBXTargetDependency section */ 514 | 515 | /* Begin PBXVariantGroup section */ 516 | 0F1CD5931D52CE36001A1047 /* LaunchScreen.storyboard */ = { 517 | isa = PBXVariantGroup; 518 | children = ( 519 | 0F1CD5941D52CE36001A1047 /* Base */, 520 | ); 521 | name = LaunchScreen.storyboard; 522 | sourceTree = ""; 523 | }; 524 | /* End PBXVariantGroup section */ 525 | 526 | /* Begin XCBuildConfiguration section */ 527 | 0F1CD5AD1D52CE37001A1047 /* Debug */ = { 528 | isa = XCBuildConfiguration; 529 | buildSettings = { 530 | ALWAYS_SEARCH_USER_PATHS = NO; 531 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 532 | CLANG_CXX_LIBRARY = "libc++"; 533 | CLANG_ENABLE_MODULES = YES; 534 | CLANG_ENABLE_OBJC_ARC = YES; 535 | CLANG_WARN_BOOL_CONVERSION = YES; 536 | CLANG_WARN_CONSTANT_CONVERSION = YES; 537 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 538 | CLANG_WARN_EMPTY_BODY = YES; 539 | CLANG_WARN_ENUM_CONVERSION = YES; 540 | CLANG_WARN_INT_CONVERSION = YES; 541 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 542 | CLANG_WARN_UNREACHABLE_CODE = YES; 543 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 544 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 545 | COPY_PHASE_STRIP = NO; 546 | DEBUG_INFORMATION_FORMAT = dwarf; 547 | ENABLE_STRICT_OBJC_MSGSEND = YES; 548 | ENABLE_TESTABILITY = YES; 549 | GCC_C_LANGUAGE_STANDARD = gnu99; 550 | GCC_DYNAMIC_NO_PIC = NO; 551 | GCC_NO_COMMON_BLOCKS = YES; 552 | GCC_OPTIMIZATION_LEVEL = 0; 553 | GCC_PREPROCESSOR_DEFINITIONS = ( 554 | "DEBUG=1", 555 | "$(inherited)", 556 | ); 557 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 558 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 559 | GCC_WARN_UNDECLARED_SELECTOR = YES; 560 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 561 | GCC_WARN_UNUSED_FUNCTION = YES; 562 | GCC_WARN_UNUSED_VARIABLE = YES; 563 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 564 | MTL_ENABLE_DEBUG_INFO = YES; 565 | ONLY_ACTIVE_ARCH = YES; 566 | SDKROOT = iphoneos; 567 | TARGETED_DEVICE_FAMILY = "1,2"; 568 | }; 569 | name = Debug; 570 | }; 571 | 0F1CD5AE1D52CE37001A1047 /* Release */ = { 572 | isa = XCBuildConfiguration; 573 | buildSettings = { 574 | ALWAYS_SEARCH_USER_PATHS = NO; 575 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 576 | CLANG_CXX_LIBRARY = "libc++"; 577 | CLANG_ENABLE_MODULES = YES; 578 | CLANG_ENABLE_OBJC_ARC = YES; 579 | CLANG_WARN_BOOL_CONVERSION = YES; 580 | CLANG_WARN_CONSTANT_CONVERSION = YES; 581 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 582 | CLANG_WARN_EMPTY_BODY = YES; 583 | CLANG_WARN_ENUM_CONVERSION = YES; 584 | CLANG_WARN_INT_CONVERSION = YES; 585 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 586 | CLANG_WARN_UNREACHABLE_CODE = YES; 587 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 588 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 589 | COPY_PHASE_STRIP = NO; 590 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 591 | ENABLE_NS_ASSERTIONS = NO; 592 | ENABLE_STRICT_OBJC_MSGSEND = YES; 593 | GCC_C_LANGUAGE_STANDARD = gnu99; 594 | GCC_NO_COMMON_BLOCKS = YES; 595 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 596 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 597 | GCC_WARN_UNDECLARED_SELECTOR = YES; 598 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 599 | GCC_WARN_UNUSED_FUNCTION = YES; 600 | GCC_WARN_UNUSED_VARIABLE = YES; 601 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 602 | MTL_ENABLE_DEBUG_INFO = NO; 603 | SDKROOT = iphoneos; 604 | TARGETED_DEVICE_FAMILY = "1,2"; 605 | VALIDATE_PRODUCT = YES; 606 | }; 607 | name = Release; 608 | }; 609 | 0F1CD5B01D52CE37001A1047 /* Debug */ = { 610 | isa = XCBuildConfiguration; 611 | buildSettings = { 612 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 613 | DEVELOPMENT_TEAM = 5MEUQ98276; 614 | INFOPLIST_FILE = MLMProgressView/Info.plist; 615 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 616 | PRODUCT_BUNDLE_IDENTIFIER = com.MLM.MLMProgressView; 617 | PRODUCT_NAME = "$(TARGET_NAME)"; 618 | }; 619 | name = Debug; 620 | }; 621 | 0F1CD5B11D52CE37001A1047 /* Release */ = { 622 | isa = XCBuildConfiguration; 623 | buildSettings = { 624 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 625 | DEVELOPMENT_TEAM = 5MEUQ98276; 626 | INFOPLIST_FILE = MLMProgressView/Info.plist; 627 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 628 | PRODUCT_BUNDLE_IDENTIFIER = com.MLM.MLMProgressView; 629 | PRODUCT_NAME = "$(TARGET_NAME)"; 630 | }; 631 | name = Release; 632 | }; 633 | 0F1CD5B31D52CE37001A1047 /* Debug */ = { 634 | isa = XCBuildConfiguration; 635 | buildSettings = { 636 | BUNDLE_LOADER = "$(TEST_HOST)"; 637 | INFOPLIST_FILE = MLMProgressViewTests/Info.plist; 638 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 639 | PRODUCT_BUNDLE_IDENTIFIER = com.MLM.MLMProgressViewTests; 640 | PRODUCT_NAME = "$(TARGET_NAME)"; 641 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MLMProgressView.app/MLMProgressView"; 642 | }; 643 | name = Debug; 644 | }; 645 | 0F1CD5B41D52CE37001A1047 /* Release */ = { 646 | isa = XCBuildConfiguration; 647 | buildSettings = { 648 | BUNDLE_LOADER = "$(TEST_HOST)"; 649 | INFOPLIST_FILE = MLMProgressViewTests/Info.plist; 650 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 651 | PRODUCT_BUNDLE_IDENTIFIER = com.MLM.MLMProgressViewTests; 652 | PRODUCT_NAME = "$(TARGET_NAME)"; 653 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MLMProgressView.app/MLMProgressView"; 654 | }; 655 | name = Release; 656 | }; 657 | 0F1CD5B61D52CE37001A1047 /* Debug */ = { 658 | isa = XCBuildConfiguration; 659 | buildSettings = { 660 | INFOPLIST_FILE = MLMProgressViewUITests/Info.plist; 661 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 662 | PRODUCT_BUNDLE_IDENTIFIER = com.MLM.MLMProgressViewUITests; 663 | PRODUCT_NAME = "$(TARGET_NAME)"; 664 | TEST_TARGET_NAME = MLMProgressView; 665 | USES_XCTRUNNER = YES; 666 | }; 667 | name = Debug; 668 | }; 669 | 0F1CD5B71D52CE37001A1047 /* Release */ = { 670 | isa = XCBuildConfiguration; 671 | buildSettings = { 672 | INFOPLIST_FILE = MLMProgressViewUITests/Info.plist; 673 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 674 | PRODUCT_BUNDLE_IDENTIFIER = com.MLM.MLMProgressViewUITests; 675 | PRODUCT_NAME = "$(TARGET_NAME)"; 676 | TEST_TARGET_NAME = MLMProgressView; 677 | USES_XCTRUNNER = YES; 678 | }; 679 | name = Release; 680 | }; 681 | /* End XCBuildConfiguration section */ 682 | 683 | /* Begin XCConfigurationList section */ 684 | 0F1CD57D1D52CE36001A1047 /* Build configuration list for PBXProject "MLMProgressView" */ = { 685 | isa = XCConfigurationList; 686 | buildConfigurations = ( 687 | 0F1CD5AD1D52CE37001A1047 /* Debug */, 688 | 0F1CD5AE1D52CE37001A1047 /* Release */, 689 | ); 690 | defaultConfigurationIsVisible = 0; 691 | defaultConfigurationName = Release; 692 | }; 693 | 0F1CD5AF1D52CE37001A1047 /* Build configuration list for PBXNativeTarget "MLMProgressView" */ = { 694 | isa = XCConfigurationList; 695 | buildConfigurations = ( 696 | 0F1CD5B01D52CE37001A1047 /* Debug */, 697 | 0F1CD5B11D52CE37001A1047 /* Release */, 698 | ); 699 | defaultConfigurationIsVisible = 0; 700 | defaultConfigurationName = Release; 701 | }; 702 | 0F1CD5B21D52CE37001A1047 /* Build configuration list for PBXNativeTarget "MLMProgressViewTests" */ = { 703 | isa = XCConfigurationList; 704 | buildConfigurations = ( 705 | 0F1CD5B31D52CE37001A1047 /* Debug */, 706 | 0F1CD5B41D52CE37001A1047 /* Release */, 707 | ); 708 | defaultConfigurationIsVisible = 0; 709 | defaultConfigurationName = Release; 710 | }; 711 | 0F1CD5B51D52CE37001A1047 /* Build configuration list for PBXNativeTarget "MLMProgressViewUITests" */ = { 712 | isa = XCConfigurationList; 713 | buildConfigurations = ( 714 | 0F1CD5B61D52CE37001A1047 /* Debug */, 715 | 0F1CD5B71D52CE37001A1047 /* Release */, 716 | ); 717 | defaultConfigurationIsVisible = 0; 718 | defaultConfigurationName = Release; 719 | }; 720 | /* End XCConfigurationList section */ 721 | }; 722 | rootObject = 0F1CD57A1D52CE36001A1047 /* Project object */; 723 | } 724 | -------------------------------------------------------------------------------- /MLMProgressView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MLMProgressView.xcodeproj/project.xcworkspace/xcuserdata/my.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView.xcodeproj/project.xcworkspace/xcuserdata/my.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MLMProgressView.xcodeproj/xcuserdata/my.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /MLMProgressView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/MLMProgressView.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 | -------------------------------------------------------------------------------- /MLMProgressView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MLMProgressView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 0F1CD5811D52CE36001A1047 16 | 17 | primary 18 | 19 | 20 | 0F1CD59A1D52CE37001A1047 21 | 22 | primary 23 | 24 | 25 | 0F1CD5A51D52CE37001A1047 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /MLMProgressView/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView/.DS_Store -------------------------------------------------------------------------------- /MLMProgressView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. 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 | -------------------------------------------------------------------------------- /MLMProgressView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. 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 | 20 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 21 | self.window.backgroundColor = [UIColor whiteColor]; 22 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[NSClassFromString(@"MainTableViewController") new]]; 23 | [self.window makeKeyAndVisible]; 24 | 25 | 26 | return YES; 27 | } 28 | 29 | - (void)applicationWillResignActive:(UIApplication *)application { 30 | // 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. 31 | // 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. 32 | } 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application { 40 | // 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. 41 | } 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application { 44 | // 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. 45 | } 46 | 47 | - (void)applicationWillTerminate:(UIApplication *)application { 48 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /MLMProgressView/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /MLMProgressView/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 | -------------------------------------------------------------------------------- /MLMProgressView/CalibrationViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CalibrationViewController.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CalibrationViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MLMProgressView/CalibrationViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CalibrationViewController.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "CalibrationViewController.h" 10 | #import "MLMCalibrationView.h" 11 | 12 | 13 | @implementation CalibrationViewController 14 | 15 | 16 | - (void)viewDidLoad { 17 | [super viewDidLoad]; 18 | MLMCalibrationView *calibra = [[MLMCalibrationView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, self.view.width) startAngle:150 endAngle:390]; 19 | calibra.center = self.view.center; 20 | calibra.textType = MLMCalibrationViewTextRotate; 21 | calibra.maxValue = 1000000; 22 | calibra.smallScaleNum = 10; 23 | calibra.majorScaleNum = 10; 24 | calibra.customArray = @[@"350",@"较差",@"550",@"中等",@"600",@"良好",@"650",@"优秀",@"700",@"极好",@"950"]; 25 | calibra.edgeSpace = 20; 26 | [calibra drawCalibration]; 27 | calibra.backgroundColor = [UIColor redColor]; 28 | [self.view addSubview:calibra]; 29 | 30 | //自定义文字等label可在下方view中设置 31 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, calibra.freeWidth, calibra.freeWidth)]; 32 | view.center = self.view.center; 33 | view.layer.cornerRadius = calibra.freeWidth/2; 34 | view.backgroundColor = [UIColor colorWithWhite:1 alpha:.3]; 35 | [self.view addSubview:view]; 36 | 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /MLMProgressView/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 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView/MLMProgress/.DS_Store -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/Help/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView/MLMProgress/Help/.DS_Store -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/Help/UIView+Extensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Extensions.h 3 | // LXCircleAnimationView 4 | // 5 | // Created by Leexin on 15/12/18. 6 | // Copyright © 2015年 Garden.Lee. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface UIView (Extensions) 13 | 14 | @property CGPoint origin; 15 | @property CGSize size; 16 | 17 | @property (readonly) CGPoint bottomLeft; 18 | @property (readonly) CGPoint bottomRight; 19 | @property (readonly) CGPoint topRight; 20 | 21 | @property CGFloat height; 22 | @property CGFloat width; 23 | 24 | @property CGFloat top; 25 | @property CGFloat left; 26 | 27 | @property CGFloat bottom; 28 | @property CGFloat right; 29 | 30 | @end 31 | 32 | 33 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/Help/UIView+Extensions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Extensions.m 3 | // LXCircleAnimationView 4 | // 5 | // Created by Leexin on 15/12/18. 6 | // Copyright © 2015年 Garden.Lee. All rights reserved. 7 | // 8 | 9 | #import "UIView+Extensions.h" 10 | 11 | @implementation UIView (Extensions) 12 | 13 | // Retrieve and set the origin 14 | - (CGPoint)origin { 15 | return self.frame.origin; 16 | } 17 | 18 | - (void)setOrigin:(CGPoint)aPoint{ 19 | CGRect newframe = self.frame; 20 | newframe.origin = aPoint; 21 | self.frame = newframe; 22 | } 23 | 24 | // Retrieve and set the size 25 | - (CGSize)size { 26 | return self.frame.size; 27 | } 28 | 29 | - (void)setSize:(CGSize)aSize { 30 | CGRect newframe = self.frame; 31 | newframe.size = aSize; 32 | self.frame = newframe; 33 | } 34 | 35 | // Query other frame locations 36 | - (CGPoint)bottomRight { 37 | CGFloat x = self.frame.origin.x + self.frame.size.width; 38 | CGFloat y = self.frame.origin.y + self.frame.size.height; 39 | return CGPointMake(x, y); 40 | } 41 | 42 | - (CGPoint)bottomLeft { 43 | CGFloat x = self.frame.origin.x; 44 | CGFloat y = self.frame.origin.y + self.frame.size.height; 45 | return CGPointMake(x, y); 46 | } 47 | 48 | - (CGPoint)topRight { 49 | CGFloat x = self.frame.origin.x + self.frame.size.width; 50 | CGFloat y = self.frame.origin.y; 51 | return CGPointMake(x, y); 52 | } 53 | 54 | 55 | // Retrieve and set height, width, top, bottom, left, right 56 | - (CGFloat)height { 57 | return self.frame.size.height; 58 | } 59 | 60 | - (void)setHeight:(CGFloat)newheight { 61 | CGRect newframe = self.frame; 62 | newframe.size.height = newheight; 63 | self.frame = newframe; 64 | } 65 | 66 | - (CGFloat)width { 67 | return self.frame.size.width; 68 | } 69 | 70 | - (void)setWidth:(CGFloat)newwidth { 71 | CGRect newframe = self.frame; 72 | newframe.size.width = newwidth; 73 | self.frame = newframe; 74 | } 75 | 76 | - (CGFloat)top { 77 | return self.frame.origin.y; 78 | } 79 | 80 | - (void)setTop:(CGFloat)newtop { 81 | CGRect newframe = self.frame; 82 | newframe.origin.y = newtop; 83 | self.frame = newframe; 84 | } 85 | 86 | - (CGFloat)left { 87 | return self.frame.origin.x; 88 | } 89 | 90 | - (void)setLeft:(CGFloat)newleft { 91 | CGRect newframe = self.frame; 92 | newframe.origin.x = newleft; 93 | self.frame = newframe; 94 | } 95 | 96 | - (CGFloat)bottom { 97 | return self.frame.origin.y + self.frame.size.height; 98 | } 99 | 100 | - (void)setBottom:(CGFloat)newbottom { 101 | CGRect newframe = self.frame; 102 | newframe.origin.y = newbottom - self.frame.size.height; 103 | self.frame = newframe; 104 | } 105 | 106 | - (CGFloat)right{ 107 | return self.frame.origin.x + self.frame.size.width; 108 | } 109 | 110 | - (void)setRight:(CGFloat)newright { 111 | CGFloat delta = newright - (self.frame.origin.x + self.frame.size.width); 112 | CGRect newframe = self.frame; 113 | newframe.origin.x += delta ; 114 | self.frame = newframe; 115 | } 116 | 117 | @end 118 | 119 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/Help/UIView+TapAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Category.h 3 | // BaseProject 4 | // 5 | // Created by my on 16/3/24. 6 | // Copyright © 2016年 base. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void (^TapAction)(); 12 | 13 | @interface UIView (TapAction) 14 | 15 | - (void)tapHandle:(TapAction)block; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/Help/UIView+TapAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Category.m 3 | // BaseProject 4 | // 5 | // Created by my on 16/3/24. 6 | // Copyright © 2016年 base. All rights reserved. 7 | // 8 | 9 | #import "UIView+TapAction.h" 10 | #import 11 | 12 | static char tapKey; 13 | 14 | @implementation UIView (TapAction) 15 | 16 | 17 | #pragma mark - 添加单击手势 18 | - (void)tapHandle:(TapAction)block { 19 | self.userInteractionEnabled = YES; 20 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)]; 21 | [self addGestureRecognizer:tap]; 22 | objc_setAssociatedObject(self, &tapKey, block, OBJC_ASSOCIATION_COPY_NONATOMIC); 23 | } 24 | 25 | - (void)tapAction:(UITapGestureRecognizer *)tap { 26 | TapAction blcok = objc_getAssociatedObject(self, &tapKey); 27 | if (blcok) { 28 | blcok(); 29 | } 30 | } 31 | @end 32 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/MLMProgressHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLMProgressHeader.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | 10 | //木有接触过画图的请观看下图方便设置角度,0-90-180-270 11 | // .......@270@....... 12 | //............@.......@.......... 13 | //..........@...........@........ 14 | //........@...............@... 15 | //......@...................@....... 16 | //....@.......................@. 17 | //....180.....................0.. 18 | //....@.......................@. 19 | //......@...................@..... 20 | //........@...............@.. 21 | //..........@...........@....... 22 | //............@.......@......... 23 | // .......@090@....... 24 | 25 | #ifndef MLMProgressHeader_h 26 | #define MLMProgressHeader_h 27 | 28 | #import "MLMCalibrationView.h" 29 | #import "MLMCircleView.h" 30 | #import "UIView+Extensions.h" 31 | #import "UIView+TapAction.h" 32 | 33 | #define DEGREES_TO_RADIANS(degrees) ((degrees)*M_PI)/180 34 | 35 | static const CGFloat kAnimationTime = 2.f; 36 | 37 | 38 | #endif /* MLMProgressHeader_h */ 39 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/MLMProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLMProgressView.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MLMProgressHeader.h" 11 | 12 | @interface MLMProgressView : UIView 13 | 14 | @property (nonatomic, strong) MLMCircleView *circle; 15 | @property (nonatomic, strong) MLMCalibrationView *calibra; 16 | 17 | 18 | //这里只是简单写两种进度盘的风格,具体使用的时候请自己组合 19 | 20 | //芝麻信用 21 | - (UIView *)sesameCreditType; 22 | 23 | //速度表盘 24 | - (UIView *)speedDialType; 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/MLMProgressView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLMProgressView.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "MLMProgressView.h" 10 | 11 | @implementation MLMProgressView 12 | 13 | //芝麻信用 14 | - (UIView *)sesameCreditType { 15 | CGFloat startAngle = 150; 16 | CGFloat endAngle = 390; 17 | 18 | //进度 19 | _circle = [[MLMCircleView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height) startAngle:startAngle endAngle:endAngle]; 20 | _circle.center = self.center; 21 | _circle.bottomWidth = 2; 22 | _circle.progressWidth = 2; 23 | _circle.fillColor = [UIColor colorWithWhite:1 alpha:.6]; 24 | _circle.bgColor = [UIColor colorWithWhite:1 alpha:.3]; 25 | _circle.dotDiameter = 8; 26 | _circle.edgespace = 10; 27 | _circle.dotImage = [UIImage imageNamed:@"brightDot"]; 28 | [_circle drawProgress]; 29 | [self addSubview:_circle]; 30 | 31 | 32 | //刻度 33 | _calibra = [[MLMCalibrationView alloc] initWithFrame:CGRectMake(0, 0, _circle.freeWidth, _circle.freeWidth) startAngle:startAngle endAngle:endAngle]; 34 | _calibra.textType = MLMCalibrationViewTextRotate; 35 | _calibra.smallScaleNum = 10; 36 | _calibra.majorScaleNum = 10; 37 | _calibra.majorScaleLength = 14; 38 | _calibra.smallScaleLength = 8; 39 | _calibra.smallScaleColor = [UIColor colorWithWhite:1 alpha:.6]; 40 | _calibra.bgColor = [UIColor colorWithWhite:1 alpha:.3]; 41 | _calibra.customArray = @[@"350",@"较差",@"550",@"中等",@"600",@"良好",@"650",@"优秀",@"700",@"极好",@"950"]; 42 | _calibra.edgeSpace = 15; 43 | _calibra.center = self.center; 44 | [_calibra drawCalibration]; 45 | [self addSubview:_calibra]; 46 | 47 | 48 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, _calibra.freeWidth, _calibra.freeWidth)]; 49 | label.center = self.center; 50 | label.textColor = [UIColor colorWithWhite:1 alpha:.8]; 51 | label.textAlignment = NSTextAlignmentCenter; 52 | label.font = [UIFont systemFontOfSize:13]; 53 | label.text = @"芝麻信用"; 54 | [self addSubview:label]; 55 | return self; 56 | } 57 | 58 | //速度表盘 59 | - (UIView *)speedDialType { 60 | CGFloat startAngle = 180; 61 | CGFloat endAngle = 360; 62 | //刻度 63 | _calibra = [[MLMCalibrationView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height) startAngle:startAngle endAngle:endAngle]; 64 | _calibra.textType = MLMCalibrationViewTextRotate; 65 | _calibra.maxValue = 1000000; 66 | _calibra.smallScaleNum = 10; 67 | _calibra.majorScaleNum = 10; 68 | _calibra.majorScaleLength = 16; 69 | _calibra.smallScaleLength = 10; 70 | _calibra.edgeSpace = 5; 71 | _calibra.bgColor = [UIColor colorWithWhite:1 alpha:.3]; 72 | _calibra.center = self.center; 73 | [_calibra drawCalibration]; 74 | [self addSubview:_calibra]; 75 | 76 | //进度 77 | _circle = [[MLMCircleView alloc] initWithFrame:CGRectMake(0, 0, _calibra.freeWidth, _calibra.freeWidth) startAngle:startAngle endAngle:endAngle]; 78 | _circle.center = self.center; 79 | _circle.bottomWidth = 5; 80 | _circle.progressWidth = 40; 81 | _circle.fillColor = [UIColor colorWithWhite:1 alpha:.3]; 82 | _circle.bgColor = [UIColor yellowColor]; 83 | _circle.dotDiameter = 8; 84 | _circle.edgespace = - _calibra.scaleFont.lineHeight; 85 | _circle.dotImage = nil; 86 | _circle.capRound = NO; 87 | [_circle bottomNearProgress:YES]; 88 | [_circle drawProgress]; 89 | [self addSubview:_circle]; 90 | 91 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, _circle.freeWidth, _circle.freeWidth)]; 92 | label.center = self.center; 93 | label.textColor = [UIColor colorWithWhite:1 alpha:.8]; 94 | label.textAlignment = NSTextAlignmentCenter; 95 | label.font = [UIFont systemFontOfSize:13]; 96 | label.text = @"速度表盘"; 97 | [self addSubview:label]; 98 | return self; 99 | } 100 | 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/blueDot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView/MLMProgress/instrument/blueDot.png -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/brightDot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView/MLMProgress/instrument/brightDot.png -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/calibration/MLMCalibrationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLMCalibrationView.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MLMProgressHeader.h" 11 | 12 | typedef enum { 13 | MLMCalibrationViewTextDefault,///text不旋转 14 | MLMCalibrationViewTextRotate///text随刻度旋转 15 | } MLMCalibrationViewTextStyle; 16 | 17 | @interface MLMCalibrationView : UIView 18 | 19 | ///总刻度 20 | @property (nonatomic, assign) NSInteger maxValue; 21 | 22 | ///大刻度 23 | ///大刻度总共分成几份 24 | @property (nonatomic, assign) NSInteger majorScaleNum; 25 | ///大刻度颜色 26 | @property (nonatomic, strong) UIColor *majorScaleColor; 27 | ///大刻度长度 28 | @property (nonatomic, assign) CGFloat majorScaleLength; 29 | ///大刻度宽度 30 | @property (nonatomic, assign) CGFloat majorScaleWidth; 31 | 32 | ///小刻度 33 | ///每个大刻度对应的小刻度分成几份 34 | @property (nonatomic, assign) NSInteger smallScaleNum; 35 | ///小刻度颜色 36 | @property (nonatomic, strong) UIColor *smallScaleColor; 37 | ///小刻度长度 38 | @property (nonatomic, assign) CGFloat smallScaleLength; 39 | //小刻度宽度 40 | @property (nonatomic, assign) CGFloat smallScaleWidth; 41 | 42 | ///背景颜色(背景宽度默认为大刻度的宽度) 43 | @property (nonatomic, strong) UIColor *bgColor; 44 | 45 | ///刻度值显示风格 46 | @property (nonatomic, assign) MLMCalibrationViewTextStyle textType; 47 | 48 | ///刻度字体 49 | @property (nonatomic, strong) UIFont *scaleFont; 50 | ///字体颜色 51 | @property (nonatomic, strong) UIColor *majorTextColor; 52 | 53 | 54 | ///Custom风格的数组,设置数组则风格强制更改为Custom 55 | @property (nonatomic, strong) NSArray *customArray; 56 | 57 | ///微调 58 | ///刻度距离view边缘的距离,默认0 59 | @property (nonatomic, assign) CGFloat edgeSpace; 60 | ///刻度值离刻度的距离,默认为5 61 | @property (nonatomic, assign) CGFloat scaleSpace; 62 | 63 | ///方便使用时布局 64 | @property (nonatomic, assign, readonly) CGFloat freeWidth; 65 | 66 | 67 | - (instancetype)initWithFrame:(CGRect)frame startAngle:(CGFloat)start endAngle:(CGFloat)end; 68 | 69 | ///请务必使用绘制 70 | - (void)drawCalibration; 71 | 72 | 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/calibration/MLMCalibrationView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLMCalibrationView.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "MLMCalibrationView.h" 10 | 11 | typedef enum { 12 | MLMCalibrationViewDefault,///Default风格数字分割仪表盘 13 | MLMCalibrationViewCustom///Custom是自定义数组显示刻度的仪表盘,类似芝麻信用 14 | } MLMCalibrationViewType; 15 | 16 | @interface MLMCalibrationView () { 17 | CGFloat circleRadius;//圆半径 18 | 19 | ///起点 20 | CGFloat _startAngle; 21 | ///终点 22 | CGFloat _endAngle; 23 | 24 | //背景宽度 25 | CGFloat bottomWidth; 26 | } 27 | ///刻度风格 28 | @property (nonatomic, assign) MLMCalibrationViewType scaleType; 29 | 30 | @property (nonatomic, strong) CAShapeLayer *bottomLayer;//弧度背景 31 | 32 | @end 33 | 34 | @implementation MLMCalibrationView 35 | 36 | - (instancetype)initWithFrame:(CGRect)frame startAngle:(CGFloat)start endAngle:(CGFloat)end { 37 | if (self = [super initWithFrame:frame]) { 38 | _startAngle = start; 39 | _endAngle = end; 40 | 41 | //默认数据 42 | [self initData]; 43 | } 44 | return self; 45 | } 46 | 47 | #pragma mark - 默认数据 48 | - (void)initData { 49 | _maxValue = 10000; 50 | 51 | _majorScaleNum = 5; 52 | _majorScaleColor = [UIColor whiteColor]; 53 | _majorScaleWidth = 1; 54 | _majorScaleLength = 15; 55 | 56 | _smallScaleNum = 6; 57 | _smallScaleColor = [UIColor whiteColor]; 58 | _smallScaleWidth = 1; 59 | _smallScaleLength = 7; 60 | 61 | _bgColor = [UIColor colorWithWhite:1 alpha:.7]; 62 | _customArray = nil; 63 | _scaleType = MLMCalibrationViewDefault; 64 | _textType = MLMCalibrationViewTextRotate; 65 | _edgeSpace = 0; 66 | _scaleSpace = 5; 67 | _scaleFont = [UIFont systemFontOfSize:10]; 68 | _majorTextColor = [UIColor whiteColor]; 69 | } 70 | 71 | #pragma mark - 绘画 72 | - (void)drawCalibration { 73 | bottomWidth = _majorScaleLength>_smallScaleLength?_majorScaleLength:_smallScaleLength; 74 | circleRadius = self.width/2 - bottomWidth/2 - _edgeSpace; 75 | //画背景 76 | [self drawBottom]; 77 | //画刻度 78 | [self drawScale]; 79 | //画刻度值 80 | [self drawScaleNum]; 81 | } 82 | 83 | #pragma mark - 背景 84 | - (void)drawBottom { 85 | UIBezierPath *bottomPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.width/2, self.height/2) 86 | radius:circleRadius 87 | startAngle:DEGREES_TO_RADIANS(_startAngle) 88 | endAngle:DEGREES_TO_RADIANS(_endAngle) 89 | clockwise:YES]; 90 | self.bottomLayer = [CAShapeLayer layer]; 91 | self.bottomLayer.frame = CGRectMake(0, 0, self.width, self.height); 92 | self.bottomLayer.fillColor = [UIColor clearColor].CGColor; 93 | self.bottomLayer.strokeColor = self.bgColor.CGColor; 94 | self.bottomLayer.opacity = .5; 95 | self.bottomLayer.lineWidth = bottomWidth; 96 | self.bottomLayer.path = [bottomPath CGPath]; 97 | [self.layer addSublayer:self.bottomLayer]; 98 | } 99 | 100 | #pragma mark - 刻度 101 | - (void)drawScale { 102 | //总刻度 103 | CGFloat totalScale; 104 | //每个刻度旋转的度数 105 | CGFloat perAngle; 106 | 107 | switch (_scaleType) { 108 | case MLMCalibrationViewDefault: 109 | { 110 | totalScale = (_majorScaleNum?_majorScaleNum:1)*(_smallScaleNum?_smallScaleNum:1); 111 | } 112 | break; 113 | case MLMCalibrationViewCustom: 114 | { 115 | totalScale = _majorScaleNum*(_smallScaleNum?_smallScaleNum:1); 116 | } 117 | break; 118 | default: 119 | break; 120 | } 121 | //每个刻度旋转的度数 122 | perAngle = (_endAngle - _startAngle)/totalScale; 123 | 124 | for (NSInteger i = 0; i < totalScale + 1; i ++) { 125 | //刻度起始度数 126 | CGFloat startAngle = _startAngle + perAngle*i; 127 | if (i%_smallScaleNum == 0) { 128 | //刻度结束度数 129 | CGFloat endAngle = startAngle + _majorScaleWidth/(2*M_PI*circleRadius)*360; 130 | UIBezierPath *majorPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.width/2, self.height/2) 131 | radius:circleRadius 132 | startAngle:DEGREES_TO_RADIANS(startAngle) 133 | endAngle:DEGREES_TO_RADIANS(endAngle) 134 | clockwise:YES]; 135 | CAShapeLayer *majorLayer = [CAShapeLayer layer]; 136 | majorLayer.strokeColor = _majorScaleColor.CGColor; 137 | majorLayer.path = [majorPath CGPath]; 138 | majorLayer.lineWidth = _majorScaleLength; 139 | [self.layer addSublayer:majorLayer]; 140 | 141 | 142 | } else { 143 | //刻度结束度数 144 | CGFloat endAngle = startAngle + _smallScaleWidth/(2*M_PI*circleRadius)*360; 145 | UIBezierPath *smallPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.width/2, self.height/2) radius:circleRadius 146 | startAngle:DEGREES_TO_RADIANS(startAngle) 147 | endAngle:DEGREES_TO_RADIANS(endAngle) 148 | clockwise:YES]; 149 | CAShapeLayer *smallLayer = [CAShapeLayer layer]; 150 | smallLayer.strokeColor = _smallScaleColor.CGColor; 151 | smallLayer.path = [smallPath CGPath]; 152 | smallLayer.lineWidth = _smallScaleLength; 153 | [self.layer addSublayer:smallLayer]; 154 | } 155 | } 156 | } 157 | 158 | 159 | 160 | #pragma mark - 刻度值 161 | - (void)drawScaleNum { 162 | //只画大刻度处对应的文字 163 | NSMutableArray *textArray = [NSMutableArray array]; 164 | switch (_scaleType) { 165 | case MLMCalibrationViewDefault: 166 | { 167 | for (NSInteger i = 0; i < _majorScaleNum + 1; i ++) { 168 | [textArray addObject:@(_maxValue/_majorScaleNum*i)]; 169 | } 170 | } 171 | break; 172 | case MLMCalibrationViewCustom: 173 | { 174 | [textArray addObjectsFromArray:_customArray]; 175 | } 176 | break; 177 | default: 178 | break; 179 | } 180 | 181 | 182 | //两种方式 183 | [self createLabel:textArray]; 184 | // [self drowText:textArray]; 185 | } 186 | 187 | #pragma mark - label 188 | - (void)createLabel:(NSArray *)textArray { 189 | // for (UILabel *label in self.subviews) { 190 | // [label removeFromSuperview]; 191 | // } 192 | //每个大刻度对应的角度 193 | CGFloat singleAngle = (_endAngle - _startAngle)/(textArray.count - 1); 194 | for (NSInteger i = 0; i < textArray.count; i ++) { 195 | //每个大刻度对应的角度 196 | CGFloat degree = _startAngle + i * singleAngle; 197 | CGFloat angle = DEGREES_TO_RADIANS(degree); 198 | 199 | //对应文字的Size 200 | CGSize textSize = [self stringSize:[NSString stringWithFormat:@"%@",textArray[i]] withFont:_scaleFont size:CGSizeMake(MAXFLOAT, _scaleFont.lineHeight)]; 201 | 202 | //对应的center 203 | CGFloat textRadius = circleRadius - self.bottomLayer.lineWidth/2 - _scaleSpace; 204 | CGPoint majorCenter = CGPointMake(self.width/2+textRadius*cosf(angle), self.height/2+textRadius*sinf(angle)); 205 | ; 206 | 207 | UILabel *scaleLable = [[UILabel alloc] init]; 208 | scaleLable.frame = CGRectMake(0, 0, textSize.width, _scaleFont.lineHeight); 209 | scaleLable.text = [NSString stringWithFormat:@"%@",textArray[i]]; 210 | scaleLable.font = _scaleFont; 211 | scaleLable.textColor = _majorTextColor; 212 | [self addSubview:scaleLable]; 213 | 214 | if (_textType == MLMCalibrationViewCustom) { 215 | //使用中心点 216 | scaleLable.center = CGPointMake(majorCenter.x - scaleLable.height/2*cosf(angle), majorCenter.y - scaleLable.height/2*sinf(angle)); 217 | scaleLable.transform = CGAffineTransformRotate(scaleLable.transform, DEGREES_TO_RADIANS(90+degree)); 218 | } else { 219 | //调整label的位置 220 | CGFloat offx = 0; 221 | CGFloat offy = 0; 222 | NSInteger angleCos = (10000 * cosf(angle)); 223 | if (angleCos == 0) { 224 | offx = -textSize.width/2; 225 | } else if (angleCos < 0) { 226 | offy = -textSize.height/2; 227 | } else { 228 | offy = -textSize.height/2; 229 | offx = -textSize.width; 230 | } 231 | 232 | scaleLable.frame = CGRectMake(majorCenter.x+offx, majorCenter.y+offy, textSize.width, _scaleFont.lineHeight); 233 | } 234 | } 235 | } 236 | 237 | #pragma makr - 画字 238 | - (void)drowText:(NSArray *)textArray { 239 | 240 | } 241 | 242 | #pragma mark - setter 243 | - (void)setCustomArray:(NSArray *)customArray { 244 | _customArray = [NSArray arrayWithArray:customArray]; 245 | if (_customArray.count) { 246 | self.scaleType = MLMCalibrationViewCustom; 247 | } else { 248 | self.scaleType = MLMCalibrationViewDefault; 249 | } 250 | } 251 | 252 | - (void)setScaleType:(MLMCalibrationViewType)scaleType { 253 | _scaleType = scaleType; 254 | if (scaleType == MLMCalibrationViewTextDefault) { 255 | _scaleSpace = 5; 256 | } 257 | } 258 | 259 | 260 | #pragma mark - 中间空区域的面积 261 | - (CGFloat)freeWidth { 262 | NSAssert(_textType == MLMCalibrationViewTextRotate, @"只有在MLMCalibrationViewTextRotate风格时可以使用"); 263 | return (circleRadius - bottomWidth/2 - _scaleSpace - self.scaleFont.lineHeight)*2; 264 | } 265 | 266 | #pragma mark - 字体长度 267 | - (CGSize)stringSize:(NSString *)string withFont:(UIFont *)font size:(CGSize)size { 268 | 269 | CGSize resultSize; 270 | if ([[UIDevice currentDevice].systemVersion floatValue] >= 7) { 271 | //段落样式 272 | NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; 273 | style.lineBreakMode = NSLineBreakByWordWrapping; 274 | 275 | //字体大小,换行模式 276 | NSDictionary *attributes = @{NSFontAttributeName : font , NSParagraphStyleAttributeName : style}; 277 | resultSize = [string boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil].size; 278 | } else { 279 | //计算正文的高度 280 | resultSize = [string sizeWithFont:font constrainedToSize:size lineBreakMode:NSLineBreakByWordWrapping]; 281 | } 282 | return resultSize; 283 | } 284 | @end 285 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/circle/MLMCircleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLMCircleView.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MLMProgressHeader.h" 11 | 12 | @interface MLMCircleView : UIView 13 | 14 | ///弧度背景色 15 | @property (nonatomic, strong) UIColor *bgColor; 16 | ///弧度填充色 17 | @property (nonatomic, strong) UIColor *fillColor; 18 | 19 | ///弧度线宽 20 | @property (nonatomic, assign) CGFloat bottomWidth; 21 | @property (nonatomic, assign) CGFloat progressWidth; 22 | 23 | ///光标的背景图片 24 | @property (nonatomic, strong) UIImage *dotImage; 25 | 26 | ///光标直径 27 | @property (nonatomic, assign) CGFloat dotDiameter; 28 | 29 | ///边缘间隔 30 | @property (nonatomic, assign) CGFloat edgespace; 31 | 32 | ///bottom和progress间隔,相对于bottom 33 | @property (nonatomic, assign) CGFloat progressSpace; 34 | 35 | ///freeWidth 36 | @property (nonatomic, assign, readonly) CGFloat freeWidth; 37 | 38 | ///是否圆角,默认YES 39 | @property (nonatomic, assign) BOOL capRound; 40 | 41 | - (instancetype)initWithFrame:(CGRect)frame 42 | startAngle:(CGFloat)start 43 | endAngle:(CGFloat)end; 44 | ///设置进度 45 | - (void)setProgress:(CGFloat)progress; 46 | 47 | ///图片隐藏 48 | - (void)dotHidden:(BOOL)hidden; 49 | 50 | ///内外线紧邻(默认是覆盖),YES外接 51 | - (void)bottomNearProgress:(BOOL)outOrIn; 52 | 53 | ///请务必使用绘制 54 | - (void)drawProgress; 55 | 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/circle/MLMCircleView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLMCircleView.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "MLMCircleView.h" 10 | 11 | @interface MLMCircleView () { 12 | CGFloat circleRadius;//bottom半径 13 | CGFloat progressRadius;//进度半径 14 | 15 | CGFloat _progress;//进度 16 | 17 | ///起点 18 | CGFloat _startAngle; 19 | ///终点 20 | CGFloat _endAngle; 21 | 22 | CGFloat lastProgress; 23 | } 24 | 25 | @property (nonatomic, strong) UIImageView *dotImageView;//光标 26 | @property (nonatomic, strong) CAShapeLayer *bottomLayer;//弧度背景 27 | @property (nonatomic, strong) CAShapeLayer *progressLayer;//进度 28 | 29 | @end 30 | 31 | 32 | @implementation MLMCircleView 33 | 34 | - (instancetype)initWithFrame:(CGRect)frame { 35 | return [self initWithFrame:frame startAngle:150 endAngle:390]; 36 | } 37 | 38 | 39 | - (instancetype)initWithFrame:(CGRect)frame 40 | startAngle:(CGFloat)start 41 | endAngle:(CGFloat)end { 42 | if (self = [super initWithFrame:frame]) { 43 | 44 | _startAngle = start; 45 | _endAngle = end; 46 | //默认数据 47 | [self initData]; 48 | 49 | } 50 | return self; 51 | } 52 | 53 | #pragma mark - 默认数据 54 | - (void)initData { 55 | _progressWidth = 6.f; 56 | _bottomWidth = 6.f; 57 | _bgColor = [UIColor blueColor]; 58 | _fillColor = [UIColor redColor]; 59 | _capRound = YES; 60 | _dotImage = [UIImage imageNamed:@"redDot"]; 61 | _dotDiameter = 20.f; 62 | 63 | _edgespace = 0; 64 | _progressSpace = 0; 65 | } 66 | 67 | 68 | #pragma mark - 计算光标的起始center 69 | - (void)dotCenter { 70 | 71 | if (_dotImageView) { 72 | [_dotImageView removeFromSuperview]; 73 | } else { 74 | _dotImageView = [[UIImageView alloc] init]; 75 | } 76 | _dotImageView.frame = CGRectMake(0, 0, self.dotDiameter, self.dotDiameter); 77 | CGFloat centerX = self.width/2 + progressRadius*cosf(DEGREES_TO_RADIANS(_startAngle)); 78 | CGFloat centerY = self.width/2 + progressRadius*sinf(DEGREES_TO_RADIANS(_startAngle)); 79 | _dotImageView.center = CGPointMake(centerX, centerY); 80 | _dotImageView.layer.cornerRadius = self.dotDiameter/2; 81 | [_dotImageView setImage:self.dotImage]; 82 | [self addSubview:_dotImageView]; 83 | } 84 | 85 | 86 | #pragma mark - draw 87 | - (void)drawProgress { 88 | // 89 | CGFloat baseRadius = self.width/2 - _edgespace; 90 | 91 | //确保边缘距离设置正确 92 | if (_progressSpace == 0) { 93 | circleRadius = progressRadius = baseRadius - MAX(_progressWidth, _bottomWidth)/2; 94 | } else if (_progressSpace < 0) { 95 | circleRadius = baseRadius + _progressSpace - _progressWidth/2; 96 | progressRadius = baseRadius - _progressWidth/2; 97 | } else { 98 | circleRadius = baseRadius - _bottomWidth/2; 99 | progressRadius = baseRadius - _bottomWidth/2 - _progressSpace; 100 | } 101 | 102 | //光标位置 103 | [self drowLayer]; 104 | [self dotCenter]; 105 | } 106 | 107 | #pragma mark - layer 108 | - (void)drowLayer { 109 | [self drowBottom]; 110 | [self drowProgress]; 111 | } 112 | 113 | 114 | 115 | - (void)drowBottom { 116 | //背景 117 | UIBezierPath *bottomPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.width/2, self.height/2) 118 | radius:circleRadius 119 | startAngle:DEGREES_TO_RADIANS(_startAngle) 120 | endAngle:DEGREES_TO_RADIANS(_endAngle) 121 | clockwise:YES]; 122 | self.bottomLayer = [CAShapeLayer layer]; 123 | self.bottomLayer.frame = CGRectMake(0, 0, self.width, self.height); 124 | self.bottomLayer.fillColor = [UIColor clearColor].CGColor; 125 | self.bottomLayer.strokeColor = self.bgColor.CGColor; 126 | if (_capRound) { 127 | self.bottomLayer.lineCap = kCALineCapRound; 128 | } 129 | self.bottomLayer.lineWidth = self.bottomWidth; 130 | self.bottomLayer.path = [bottomPath CGPath]; 131 | [self.layer addSublayer:self.bottomLayer]; 132 | } 133 | 134 | - (void)drowProgress { 135 | 136 | UIBezierPath *progressPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.width/2, self.height/2) 137 | radius:progressRadius 138 | startAngle:DEGREES_TO_RADIANS(_startAngle) 139 | endAngle:DEGREES_TO_RADIANS(_endAngle) 140 | clockwise:YES]; 141 | self.progressLayer = [CAShapeLayer layer]; 142 | self.progressLayer.frame = CGRectMake(0, 0, self.width, self.height); 143 | self.progressLayer.fillColor = [UIColor clearColor].CGColor; 144 | self.progressLayer.strokeColor = self.fillColor.CGColor; 145 | if (_capRound) { 146 | self.progressLayer.lineCap = kCALineCapRound; 147 | } 148 | self.progressLayer.lineWidth = self.progressWidth; 149 | self.progressLayer.path = [progressPath CGPath]; 150 | self.progressLayer.strokeEnd = 0; 151 | [self.layer addSublayer:self.progressLayer]; 152 | 153 | 154 | //add image.layer to progressLayer 155 | } 156 | 157 | 158 | 159 | #pragma mark - 动画 160 | - (void)createAnimation { 161 | CGFloat centerX = self.width/2 + progressRadius*cosf(DEGREES_TO_RADIANS(_endAngle - _startAngle)*lastProgress); 162 | CGFloat centerY = self.width/2 + progressRadius*sinf(DEGREES_TO_RADIANS(_endAngle - _startAngle)*lastProgress); 163 | _dotImageView.center = CGPointMake(centerX, centerY); 164 | 165 | //设置动画 166 | CAKeyframeAnimation *pathAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; 167 | pathAnimation.calculationMode = kCAAnimationPaced;//使得动画均匀进行 168 | //动画结束不被移除 169 | pathAnimation.fillMode = kCAFillModeForwards; 170 | pathAnimation.removedOnCompletion = NO; 171 | pathAnimation.rotationMode = kCAAnimationRotateAuto; 172 | pathAnimation.duration = kAnimationTime; 173 | pathAnimation.repeatCount = 1; 174 | 175 | //设置动画路径 176 | CGMutablePathRef path = CGPathCreateMutable(); 177 | 178 | CGPathAddArc(path, 179 | NULL, 180 | self.width/2, 181 | self.height/2, 182 | progressRadius, 183 | DEGREES_TO_RADIANS(_endAngle - _startAngle)*lastProgress + DEGREES_TO_RADIANS(_startAngle), 184 | DEGREES_TO_RADIANS(_endAngle - _startAngle)*_progress + DEGREES_TO_RADIANS(_startAngle), lastProgress > _progress); 185 | pathAnimation.path=path; 186 | CGPathRelease(path); 187 | [self.dotImageView.layer addAnimation:pathAnimation forKey:@"moveMarker"]; 188 | } 189 | 190 | #pragma mark - 弧度 191 | - (void)setProgress:(CGFloat)progress { 192 | _progress = progress; 193 | [self setProgressAnimation:YES]; 194 | } 195 | 196 | - (void)setProgressAnimation:(BOOL)animation { 197 | if (_progress == lastProgress) { 198 | return; 199 | } 200 | [self createAnimation]; 201 | [self circleAnimation]; 202 | } 203 | 204 | 205 | - (void)circleAnimation { 206 | //开启事务 207 | [CATransaction begin]; 208 | //关闭动画 209 | [CATransaction setDisableActions:YES]; 210 | self.progressLayer.strokeEnd = lastProgress; 211 | [CATransaction commit]; 212 | 213 | 214 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; 215 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 216 | animation.duration = kAnimationTime; 217 | animation.repeatCount = 1; 218 | animation.fromValue = @(lastProgress); 219 | animation.toValue = @(_progress); 220 | animation.fillMode = kCAFillModeForwards; 221 | animation.removedOnCompletion = NO; 222 | [self.progressLayer addAnimation:animation forKey:@"strokeEndAni"]; 223 | lastProgress = _progress; 224 | } 225 | 226 | - (void)dotHidden:(BOOL)hidden { 227 | _dotImageView.hidden = hidden; 228 | } 229 | 230 | - (CGFloat)freeWidth { 231 | //最小半径 232 | CGFloat cirle = circleRadius - _bottomWidth/2; 233 | CGFloat progress = progressRadius - _progressWidth/2; 234 | 235 | return MIN(cirle, progress)*2; 236 | 237 | } 238 | 239 | - (void)bottomNearProgress:(BOOL)outOrIn { 240 | CGFloat nearSpace = (self.bottomWidth+self.progressWidth)/2; 241 | if (outOrIn) { 242 | self.progressSpace = -nearSpace; 243 | } else { 244 | self.progressSpace = nearSpace; 245 | } 246 | } 247 | 248 | @end 249 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/instrument/redDot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView/MLMProgress/instrument/redDot.png -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/statistical/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/MLMProgressView/MLMProgress/statistical/.DS_Store -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/statistical/MLMStatisticalView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLMStatisticalView.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/9/7. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MLMStatisticalView : UIView 12 | 13 | ///百分比数组 14 | @property (nonatomic, strong) NSArray *scaleArray; 15 | ///填充色数组 16 | @property (nonatomic, strong) NSArray *colorArray; 17 | ///宽度数组 18 | @property (nonatomic, strong) NSArray *widthArray; 19 | 20 | ///底部颜色 21 | @property (nonatomic, strong) UIColor *bottomColor; 22 | ///底部宽 23 | @property (nonatomic, assign) CGFloat bottomWidth; 24 | 25 | ///freeWidth 26 | @property (nonatomic, assign, readonly) CGFloat freeWidth; 27 | 28 | 29 | 30 | - (instancetype)initWithFrame:(CGRect)frame 31 | startAngle:(CGFloat)start 32 | endAngle:(CGFloat)end; 33 | - (void)drow; 34 | - (UIView *)centerView; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/statistical/MLMStatisticalView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLMStatisticalView.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/9/7. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "MLMStatisticalView.h" 10 | #import "MLMProgressHeader.h" 11 | 12 | @interface MLMStatisticalView () 13 | { 14 | ///中空位置半径,根据传入的宽度计算半径 15 | CGFloat radius; 16 | 17 | ///起点 18 | CGFloat _startAngle; 19 | ///终点 20 | CGFloat _endAngle; 21 | 22 | 23 | ///中心view 24 | UIView *centerView; 25 | } 26 | 27 | @property (nonatomic, strong) CAShapeLayer *bottomLayer; 28 | 29 | @end 30 | 31 | @implementation MLMStatisticalView 32 | 33 | - (instancetype)initWithFrame:(CGRect)frame { 34 | self = [self initWithFrame:frame startAngle:0 endAngle:360]; 35 | return self; 36 | } 37 | 38 | - (instancetype)initWithFrame:(CGRect)frame 39 | startAngle:(CGFloat)start 40 | endAngle:(CGFloat)end { 41 | if (self = [super initWithFrame:frame]) { 42 | //默认数据 43 | _startAngle = start; 44 | _endAngle = end; 45 | 46 | //Bottom 47 | _bottomColor = [UIColor colorWithWhite:1 alpha:.5]; 48 | _bottomWidth = 40; 49 | 50 | radius = self.width - _bottomWidth; 51 | } 52 | return self; 53 | } 54 | 55 | 56 | #pragma mark - 计算数组中的最大值 57 | - (CGFloat)maxWidth:(NSArray *)arr { 58 | NSArray *array = [arr sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { 59 | if ([obj1 floatValue] > [obj2 floatValue]) { 60 | return NSOrderedAscending; 61 | } 62 | if ([obj1 floatValue] < [obj2 floatValue]) { 63 | return NSOrderedDescending; 64 | } 65 | return NSOrderedSame; 66 | }]; 67 | 68 | return [array.firstObject floatValue]; 69 | } 70 | 71 | - (CGFloat)minWidth:(NSArray *)arr { 72 | NSArray *array = [arr sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { 73 | if ([obj1 floatValue] > [obj2 floatValue]) { 74 | return NSOrderedAscending; 75 | } 76 | if ([obj1 floatValue] < [obj2 floatValue]) { 77 | return NSOrderedDescending; 78 | } 79 | return NSOrderedSame; 80 | }]; 81 | 82 | return [array.lastObject floatValue]; 83 | } 84 | 85 | 86 | #pragma mark - 画总刻度 87 | - (void)drowBottom { 88 | UIBezierPath *bottomPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.width/2,self.height/2) 89 | radius:radius+_bottomWidth/2 90 | startAngle:DEGREES_TO_RADIANS(_startAngle) 91 | endAngle:DEGREES_TO_RADIANS(_endAngle) 92 | clockwise:NO]; 93 | self.bottomLayer = [CAShapeLayer layer]; 94 | self.bottomLayer.frame = CGRectMake(0, 0, self.width, self.height); 95 | self.bottomLayer.fillColor = [UIColor clearColor].CGColor; 96 | self.bottomLayer.strokeColor = _bottomColor.CGColor; 97 | self.bottomLayer.lineWidth = _bottomWidth; 98 | self.bottomLayer.path = [bottomPath CGPath]; 99 | [self.layer addSublayer:self.bottomLayer]; 100 | } 101 | 102 | 103 | #pragma mark - 根据数组画统计 104 | - (void)drowStatistical { 105 | //获取最大的那个宽度 106 | CGFloat maxWidth = [self maxWidth:_widthArray]; 107 | 108 | _bottomWidth = [self minWidth:_widthArray]; 109 | //中空位置半径 110 | radius = self.width/2 - maxWidth; 111 | 112 | [self drowBottom]; 113 | 114 | 115 | //添加centerView 116 | [self addSubview:[self centerView]]; 117 | 118 | //上一个结束的角度 119 | CGFloat end = 0; 120 | 121 | for (NSInteger i = 0; i < _scaleArray.count; i ++) { 122 | //百分比 123 | CGFloat scale = [_scaleArray[i] floatValue]; 124 | if (scale == 0) { 125 | continue; 126 | } 127 | //开始角度 128 | CGFloat startAngle = end; 129 | CGFloat endAngle; 130 | 131 | //防止转换过程,出现偏差 132 | if (i == _scaleArray.count - 1 || scale == 1) { 133 | endAngle = _endAngle; 134 | } else { 135 | endAngle = end + (1-scale) * (_endAngle - _startAngle); 136 | 137 | //逆时针角度计算bug解决 138 | if (endAngle > 360) { 139 | endAngle -= 360; 140 | } 141 | } 142 | 143 | CGFloat scaleRadius = radius + [_widthArray[i] floatValue]/2; 144 | 145 | UIBezierPath *scalePath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.width/2, self.height/2) 146 | radius:scaleRadius 147 | startAngle:DEGREES_TO_RADIANS(startAngle) 148 | endAngle:DEGREES_TO_RADIANS(endAngle) 149 | clockwise:NO]; 150 | 151 | 152 | CAShapeLayer *scaleLayer = [CAShapeLayer layer]; 153 | scaleLayer.fillColor = [UIColor clearColor].CGColor; 154 | 155 | // 156 | UIColor *strokeColor = _colorArray[i]; 157 | scaleLayer.strokeColor = strokeColor.CGColor; 158 | scaleLayer.lineWidth = [_widthArray[i] floatValue]; 159 | scaleLayer.path = [scalePath CGPath]; 160 | [self.layer addSublayer:scaleLayer]; 161 | 162 | //每次结束 163 | end = endAngle; 164 | } 165 | 166 | } 167 | 168 | 169 | - (CGFloat)freeWidth { 170 | return radius*2; 171 | } 172 | 173 | - (UIView *)centerView { 174 | if (!centerView) { 175 | centerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.freeWidth, self.freeWidth)]; 176 | centerView.layer.cornerRadius = radius; 177 | centerView.backgroundColor = [UIColor greenColor]; 178 | centerView.center = self.center; 179 | } 180 | return centerView; 181 | } 182 | 183 | 184 | 185 | - (void)drow { 186 | [self drowStatistical]; 187 | } 188 | @end 189 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/waterWave/MLMWaveWaterView.h: -------------------------------------------------------------------------------- 1 | // 2 | // WaveWaterView.h 3 | // WaveWaterProgress 4 | // 5 | // Created by my on 2016/11/9. 6 | // Copyright © 2016年 my. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MLMWaveWaterView.h" 11 | 12 | typedef enum { 13 | WaveDirectionLeft, 14 | WaveDirectionRight, 15 | WaveDirectionTop, 16 | WaveDirectionBottom 17 | } WaveDirection; 18 | 19 | 20 | @interface MLMWaveWaterView : UIView 21 | 22 | ///边界path,水波的容器 23 | @property (nonatomic, strong) UIBezierPath *borderPath; 24 | //容器填充色 25 | @property (nonatomic, strong) UIColor *border_fillColor; 26 | //容器描边色 27 | @property (nonatomic, strong) UIColor *border_strokeColor; 28 | 29 | @property (nonatomic, assign) WaveDirection *waveDirection; 30 | 31 | ///前方波纹颜色 32 | @property (nonatomic, strong) UIColor *topColor; 33 | ///后方波纹颜色 34 | @property (nonatomic, strong) UIColor *bottomColor; 35 | 36 | //y = asin(wx+φ) + k 37 | ///进度,计算k 38 | @property (nonatomic, assign) CGFloat progress; 39 | ///振幅,a 40 | @property (nonatomic, assign) CGFloat wave_Amplitude; 41 | ///周期,w 42 | @property (nonatomic, assign) CGFloat wave_Cycle; 43 | ///两个波水平之间偏移 44 | @property (nonatomic, assign) CGFloat wave_h_distance; 45 | ///两个波竖直之间偏移 46 | @property (nonatomic, assign) CGFloat wave_v_distance; 47 | 48 | ///水波速率 49 | @property (nonatomic, assign) CGFloat wave_scale; 50 | ///progress速率 51 | @property (nonatomic, assign) CGFloat progress_scale; 52 | 53 | ///是否需要进度变化的动画,默认YES 54 | @property (nonatomic, assign) BOOL progress_animation; 55 | 56 | ///对于不规则图形,进度变化相对于自身的frame 57 | @property (nonatomic) CGRect changeFrame; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/waterWave/MLMWaveWaterView.m: -------------------------------------------------------------------------------- 1 | // 2 | // WaveWaterView.m 3 | // WaveWaterProgress 4 | // 5 | // Created by my on 2016/11/9. 6 | // Copyright © 2016年 my. All rights reserved. 7 | // 8 | 9 | #import "MLMWaveWaterView.h" 10 | 11 | @interface MLMWaveWaterView () 12 | { 13 | CGFloat _wave_offsety;//根据进度计算(波峰所在位置的y坐标) 14 | CGFloat _offsety_scale;//上升的速度 15 | 16 | CGFloat _wave_move_width;//移动的距离,配合速率设置 17 | 18 | CGFloat _wave_offsetx;//偏移,animation 19 | 20 | CADisplayLink *_waveDisplaylink; 21 | 22 | } 23 | 24 | @end 25 | 26 | @implementation MLMWaveWaterView 27 | 28 | 29 | - (instancetype)initWithFrame:(CGRect)frame { 30 | if (self = [super initWithFrame:frame]) { 31 | self.backgroundColor = [UIColor whiteColor]; 32 | [self initView]; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | #pragma mark - initView 39 | - (void)initView { 40 | 41 | _wave_Amplitude = self.frame.size.height/20; 42 | _wave_Cycle = 2*M_PI/(self.frame.size.width * .9); 43 | 44 | 45 | _wave_h_distance = 2*M_PI/_wave_Cycle * .65; 46 | _wave_v_distance = _wave_Amplitude * .2; 47 | 48 | _wave_move_width = 0.5; 49 | 50 | _wave_scale = 0.5; 51 | 52 | _offsety_scale = 0.01; 53 | 54 | _topColor = [UIColor colorWithRed:79/255.0 green:240/255.0 blue:255/255.0 alpha:1]; 55 | _bottomColor = [UIColor colorWithRed:79/255.0 green:240/255.0 blue:255/255.0 alpha:.3]; 56 | 57 | _progress_animation = YES; 58 | _wave_offsety = (1-_progress) * (self.frame.size.height + 2* _wave_Amplitude); 59 | [self startWave]; 60 | } 61 | 62 | 63 | #pragma mark - drawRect 64 | - (void)drawRect:(CGRect)rect { 65 | if (_borderPath) { 66 | if (_border_fillColor) { 67 | [_border_fillColor setFill]; 68 | [_borderPath fill]; 69 | } 70 | 71 | if (_border_strokeColor) { 72 | [_border_strokeColor setStroke]; 73 | [_borderPath stroke]; 74 | } 75 | 76 | [_borderPath addClip]; 77 | } 78 | [self drawWaveColor:_topColor offsetx:0 offsety:0]; 79 | [self drawWaveColor:_bottomColor offsetx:_wave_h_distance offsety:_wave_v_distance]; 80 | 81 | } 82 | 83 | #pragma mark - draw wave 84 | - (void)drawWaveColor:(UIColor *)color offsetx:(CGFloat)offsetx offsety:(CGFloat)offsety { 85 | 86 | //波浪动画,所以进度的实际操作范围是,多加上两个振幅的高度,到达设置进度的位置y坐标 87 | CGFloat end_offY = (1-_progress) * (self.frame.size.height + 2* _wave_Amplitude); 88 | if (_progress_animation) { 89 | if (_wave_offsety != end_offY) { 90 | if (end_offY < _wave_offsety) {//上升 91 | _wave_offsety = MAX(_wave_offsety-=(_wave_offsety - end_offY)*_offsety_scale, end_offY); 92 | } else { 93 | _wave_offsety = MIN(_wave_offsety+=(end_offY-_wave_offsety)*_offsety_scale, end_offY); 94 | } 95 | } 96 | } else { 97 | _wave_offsety = end_offY; 98 | } 99 | 100 | UIBezierPath *wave = [UIBezierPath bezierPath]; 101 | for (float next_x= 0.f; next_x <= self.frame.size.width; next_x ++) { 102 | //正弦函数 103 | CGFloat next_y = _wave_Amplitude * sin(_wave_Cycle*next_x + _wave_offsetx + offsetx/self.bounds.size.width*2*M_PI) + _wave_offsety + offsety; 104 | if (next_x == 0) { 105 | [wave moveToPoint:CGPointMake(next_x, next_y - _wave_Amplitude)]; 106 | } else { 107 | [wave addLineToPoint:CGPointMake(next_x, next_y - _wave_Amplitude)]; 108 | } 109 | } 110 | [wave addLineToPoint:CGPointMake(self.frame.size.width, self.frame.size.height)]; 111 | [wave addLineToPoint:CGPointMake(0, self.bounds.size.height)]; 112 | [color set]; 113 | [wave fill]; 114 | } 115 | 116 | #pragma mark - animation 117 | - (void)changeoff { 118 | _wave_offsetx += _wave_move_width*_wave_scale; 119 | [self setNeedsDisplay]; 120 | } 121 | 122 | #pragma mark - reStart 123 | - (void)startWave { 124 | 125 | if (!_waveDisplaylink) { 126 | _waveDisplaylink = [CADisplayLink displayLinkWithTarget:self selector:@selector(changeoff)]; 127 | [_waveDisplaylink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; 128 | } 129 | } 130 | 131 | - (void)dealloc { 132 | if (_waveDisplaylink) { 133 | [_waveDisplaylink invalidate]; 134 | _waveDisplaylink = nil; 135 | } 136 | 137 | } 138 | 139 | @end 140 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/waterWave/UIView+MLMBorderPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MLMBorderPath.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 2016/11/17. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (MLMBorderPath) 12 | //******建议的宽高比是为了确保设置的进度准确显示********// 13 | 14 | 15 | ///心形效果建议设置一块矩形区域(宽高比10:9),具体效果自己查看 16 | + (UIBezierPath *)heartPathRect:(CGRect)rect 17 | lineWidth:(CGFloat)width; 18 | 19 | ///圆形区域的path 20 | + (UIBezierPath *)circlePathRect:(CGRect)rect 21 | lineWidth:(CGFloat)width; 22 | 23 | ///星星path,设置为建议举行区域(宽高比: 2:(sin(3*M_PI/10) + 1) ) 24 | + (UIBezierPath *)startPathRect:(CGRect)rect 25 | lineWidth:(CGFloat)width; 26 | @end 27 | -------------------------------------------------------------------------------- /MLMProgressView/MLMProgress/waterWave/UIView+MLMBorderPath.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MLMBorderPath.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 2016/11/17. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "UIView+MLMBorderPath.h" 10 | 11 | @implementation UIView (MLMBorderPath) 12 | 13 | + (UIBezierPath *)heartPathRect:(CGRect)rect 14 | lineWidth:(CGFloat)width { 15 | CGFloat radius = rect.size.width/4; 16 | 17 | CGPoint center1 = CGPointMake(radius, radius); 18 | CGPoint center2 = CGPointMake(3*radius, radius); 19 | 20 | CGPoint bottom = CGPointMake(2*radius, rect.size.height); 21 | 22 | UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:center1 radius:radius startAngle:0 endAngle:3*M_PI_4 clockwise:NO]; 23 | 24 | [path addLineToPoint:bottom]; 25 | [path addArcWithCenter:center2 radius:radius startAngle:M_PI_4 endAngle:M_PI clockwise:NO]; 26 | 27 | [path setLineCapStyle:kCGLineCapRound]; 28 | 29 | [path setLineWidth:width]; 30 | 31 | return path; 32 | } 33 | 34 | ///圆形区域的path 35 | + (UIBezierPath *)circlePathRect:(CGRect)rect 36 | lineWidth:(CGFloat)width { 37 | //没有直接使用rect防止传入的是frame而不是试图的bounds 38 | UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0, 0, rect.size.width, rect.size.height)]; 39 | [path setLineWidth:width]; 40 | 41 | return path; 42 | } 43 | 44 | + (UIBezierPath *)startPathRect:(CGRect)rect 45 | lineWidth:(CGFloat)width { 46 | UIBezierPath *star = [UIBezierPath bezierPath]; 47 | //确定中心点 48 | CGPoint centerPoint = CGPointMake(rect.size.width/2, rect.size.width/2); 49 | //确定半径 50 | CGFloat bigRadius = rect.size.width/2; 51 | CGFloat smallRadius = bigRadius * sin(2*M_PI/20) / cos(2*M_PI/10); 52 | //起始点 53 | CGPoint start=CGPointMake(rect.size.width/2, 0); 54 | [star moveToPoint:start]; 55 | //五角星每个顶角与圆心连线的夹角 2π/5, 56 | CGFloat angle=2*M_PI/5.0; 57 | for (int i=1; i<=10; i++) { 58 | CGFloat x; 59 | CGFloat y; 60 | NSInteger c = i/2; 61 | if (i%2 == 0) { 62 | x=centerPoint.x-sinf(c*angle)*bigRadius; 63 | y=centerPoint.y-cosf(c*angle)*bigRadius; 64 | } else { 65 | x=centerPoint.x-sinf(c*angle + angle/2)*smallRadius; 66 | y=centerPoint.y-cosf(c*angle + angle/2)*smallRadius; 67 | } 68 | [star addLineToPoint:CGPointMake(x, y)]; 69 | } 70 | [star setLineWidth:width]; 71 | 72 | return star; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /MLMProgressView/MainTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainTableViewController.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MLMProgressView/MainTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainTableViewController.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "MainTableViewController.h" 10 | 11 | @interface MainTableViewController () { 12 | NSArray *listArray; 13 | } 14 | 15 | @end 16 | 17 | @implementation MainTableViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | self.title = @"MLMProgress"; 22 | listArray = @[@"进度",@"刻度",@"合体",@"统计",@"水波"]; 23 | } 24 | 25 | - (void)didReceiveMemoryWarning { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | #pragma mark - Table view data source 31 | 32 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 33 | return 1; 34 | } 35 | 36 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 37 | return listArray.count; 38 | } 39 | 40 | 41 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 42 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; 43 | if (!cell) { 44 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; 45 | } 46 | cell.selectionStyle = 0; 47 | cell.textLabel.text = listArray[indexPath.row]; 48 | return cell; 49 | } 50 | 51 | 52 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 53 | switch (indexPath.row) { 54 | case 0: 55 | { 56 | UIViewController *vc = [NSClassFromString(@"ProgressViewController") new]; 57 | vc.title = listArray[indexPath.row]; 58 | [self.navigationController pushViewController:vc animated:YES]; 59 | } 60 | break; 61 | case 1: 62 | { 63 | UIViewController *vc = [NSClassFromString(@"CalibrationViewController") new]; 64 | vc.title = listArray[indexPath.row]; 65 | [self.navigationController pushViewController:vc animated:YES]; 66 | } 67 | break; 68 | case 2: 69 | { 70 | UIViewController *vc = [NSClassFromString(@"TotalProgressVC") new]; 71 | vc.title = listArray[indexPath.row]; 72 | [self.navigationController pushViewController:vc animated:YES]; 73 | } 74 | break; 75 | case 3: 76 | { 77 | UIViewController *vc = [NSClassFromString(@"StatisticalVC") new]; 78 | vc.title = listArray[indexPath.row]; 79 | [self.navigationController pushViewController:vc animated:YES]; 80 | } 81 | break; 82 | case 4: 83 | { 84 | UIViewController *vc = [NSClassFromString(@"WaterWaveVC") new]; 85 | vc.title = listArray[indexPath.row]; 86 | [self.navigationController pushViewController:vc animated:YES]; 87 | } 88 | break; 89 | default: 90 | break; 91 | } 92 | } 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /MLMProgressView/ProgressViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressViewController.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ProgressViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MLMProgressView/ProgressViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressViewController.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "ProgressViewController.h" 10 | #import "MLMCircleView.h" 11 | 12 | @interface ProgressViewController () 13 | { 14 | UICollectionView *_collectionView; 15 | 16 | } 17 | 18 | @end 19 | 20 | @implementation ProgressViewController 21 | 22 | static NSString * const reuseIdentifier = @"Cell"; 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | UICollectionViewFlowLayout *flow = [UICollectionViewFlowLayout new]; 27 | flow.minimumLineSpacing = 1; 28 | flow.minimumInteritemSpacing = 1; 29 | flow.itemSize = CGSizeMake((self.view.width-3)/2, (self.view.width-3)/2); 30 | flow.sectionInset = UIEdgeInsetsMake(1, 1, 1, 1); 31 | _collectionView = [[UICollectionView alloc] initWithFrame:self.view.frame collectionViewLayout:flow]; 32 | _collectionView.delegate = self; 33 | _collectionView.dataSource = self; 34 | _collectionView.backgroundColor = [UIColor whiteColor]; 35 | [_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:reuseIdentifier]; 36 | [self.view addSubview:_collectionView]; 37 | } 38 | 39 | 40 | 41 | #pragma mark 42 | 43 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { 44 | return 1; 45 | } 46 | 47 | 48 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 49 | return 4; 50 | } 51 | 52 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 53 | UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath]; 54 | cell.backgroundColor = [UIColor colorWithRed:0 green:0.5 blue:1 alpha:1]; 55 | for (MLMCircleView *view in cell.subviews) { 56 | [view removeFromSuperview]; 57 | } 58 | switch (indexPath.row) { 59 | case 0: 60 | { 61 | [self type1:cell]; 62 | } 63 | break; 64 | case 1: 65 | { 66 | [self type2:cell]; 67 | } 68 | break; 69 | case 2: 70 | { 71 | [self type3:cell]; 72 | } 73 | break; 74 | case 3: 75 | { 76 | [self type4:cell]; 77 | } 78 | break; 79 | default: 80 | break; 81 | } 82 | 83 | return cell; 84 | } 85 | 86 | #pragma mark - 自定义 87 | - (void)type1:(UICollectionViewCell *)cell { 88 | MLMCircleView *circle = [[MLMCircleView alloc] initWithFrame:CGRectMake(0, 0, cell.width,cell.width) startAngle:150 endAngle:390]; 89 | circle.center = CGPointMake(cell.width/2, cell.height/2); 90 | 91 | circle.bottomWidth = 10; 92 | circle.progressWidth = 10; 93 | circle.fillColor = [UIColor greenColor]; 94 | circle.bgColor = [UIColor colorWithWhite:1 alpha:.5]; 95 | circle.dotDiameter = 10; 96 | circle.dotImage = [UIImage imageNamed:@"redDot"]; 97 | [circle bottomNearProgress:NO]; 98 | [circle drawProgress]; 99 | circle.backgroundColor = [UIColor clearColor]; 100 | 101 | [circle tapHandle:^{ 102 | [circle setProgress:newProgress()]; 103 | }]; 104 | 105 | //自定义文字等label可在下方view中设置 106 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, circle.freeWidth, circle.freeWidth)]; 107 | view.layer.cornerRadius = circle.freeWidth/2; 108 | view.backgroundColor = [UIColor colorWithWhite:1 alpha:.2]; 109 | [circle addSubview:view]; 110 | view.center = CGPointMake(cell.width/2, cell.height/2); 111 | 112 | [cell addSubview:circle]; 113 | } 114 | 115 | - (void)type2:(UICollectionViewCell *)cell { 116 | MLMCircleView *circle = [[MLMCircleView alloc] initWithFrame:CGRectMake(0, 0, cell.width,cell.width)]; 117 | circle.center = CGPointMake(cell.width/2, cell.height/2); 118 | circle.bottomWidth = 4; 119 | circle.progressWidth = 4; 120 | circle.fillColor = [UIColor greenColor]; 121 | circle.bgColor = [UIColor colorWithWhite:1 alpha:.5]; 122 | circle.dotDiameter = 20; 123 | circle.edgespace = 5; 124 | circle.dotImage = [UIImage imageNamed:@"brightDot"]; 125 | [circle drawProgress]; 126 | 127 | [circle tapHandle:^{ 128 | [circle setProgress:newProgress()]; 129 | }]; 130 | 131 | [cell addSubview:circle]; 132 | } 133 | 134 | - (void)type3:(UICollectionViewCell *)cell { 135 | MLMCircleView *circle = [[MLMCircleView alloc] initWithFrame:CGRectMake(0, 0, cell.width,cell.width) startAngle:180 endAngle:360]; 136 | circle.center = CGPointMake(cell.width/2, cell.height/2); 137 | circle.bottomWidth = 4; 138 | circle.progressWidth = 20; 139 | circle.fillColor = [UIColor greenColor]; 140 | circle.bgColor = [UIColor colorWithWhite:1 alpha:.5]; 141 | circle.dotDiameter = 8; 142 | circle.edgespace = 5; 143 | circle.dotImage = nil; 144 | [circle bottomNearProgress:YES]; 145 | circle.capRound = NO; 146 | [circle drawProgress]; 147 | [circle tapHandle:^{ 148 | [circle setProgress:newProgress()]; 149 | }]; 150 | 151 | [cell addSubview:circle]; 152 | 153 | } 154 | 155 | - (void)type4:(UICollectionViewCell *)cell { 156 | MLMCircleView *circle = [[MLMCircleView alloc] initWithFrame:CGRectMake(0, 0, cell.width,cell.width) startAngle:90 endAngle:360]; 157 | circle.center = CGPointMake(cell.width/2, cell.height/2); 158 | circle.bottomWidth = 4; 159 | circle.progressWidth = 4; 160 | circle.fillColor = [UIColor greenColor]; 161 | circle.bgColor = [UIColor colorWithWhite:1 alpha:.5]; 162 | circle.dotDiameter = 8; 163 | circle.edgespace = 5; 164 | circle.progressSpace = 10; 165 | circle.dotImage = [UIImage imageNamed:@"redDot"]; 166 | [circle drawProgress]; 167 | 168 | [circle tapHandle:^{ 169 | [circle setProgress:newProgress()]; 170 | 171 | }]; 172 | 173 | 174 | [cell addSubview:circle]; 175 | } 176 | 177 | 178 | CGFloat newProgress() { 179 | return arc4random()%500/500.0; 180 | } 181 | 182 | @end 183 | -------------------------------------------------------------------------------- /MLMProgressView/StatisticalVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // StatisticalVC.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/9/7. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface StatisticalVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MLMProgressView/StatisticalVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // StatisticalVC.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/9/7. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "StatisticalVC.h" 10 | #import "MLMStatisticalView.h" 11 | 12 | @interface StatisticalVC () 13 | 14 | @end 15 | 16 | @implementation StatisticalVC 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | MLMStatisticalView *view = [[MLMStatisticalView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; 22 | view.scaleArray = @[@(0.23),@(.52),@(.25)]; 23 | view.colorArray = @[[UIColor redColor],[UIColor blueColor],[UIColor yellowColor]]; 24 | view.widthArray = @[@(50),@(30),@(40)]; 25 | [view drow]; 26 | view.center = self.view.center; 27 | [self.view addSubview:view]; 28 | 29 | 30 | UILabel *label = [[UILabel alloc] init]; 31 | label.frame = view.centerView.bounds; 32 | [view.centerView addSubview:label]; 33 | label.text = @"我美吗"; 34 | label.textAlignment = NSTextAlignmentCenter; 35 | 36 | } 37 | 38 | - (void)didReceiveMemoryWarning { 39 | [super didReceiveMemoryWarning]; 40 | // Dispose of any resources that can be recreated. 41 | } 42 | 43 | /* 44 | #pragma mark - Navigation 45 | 46 | // In a storyboard-based application, you will often want to do a little preparation before navigation 47 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 48 | // Get the new view controller using [segue destinationViewController]. 49 | // Pass the selected object to the new view controller. 50 | } 51 | */ 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /MLMProgressView/TotalProgressVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // TotalProgressVC.h 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/10. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TotalProgressVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MLMProgressView/TotalProgressVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // TotalProgressVC.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/10. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import "TotalProgressVC.h" 10 | #import "MLMProgressView.h" 11 | @interface TotalProgressVC () 12 | { 13 | UICollectionView *_collectionView; 14 | } 15 | @end 16 | 17 | @implementation TotalProgressVC 18 | 19 | static NSString * const reuseIdentifier = @"Cell"; 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | UICollectionViewFlowLayout *flow = [UICollectionViewFlowLayout new]; 25 | flow.minimumLineSpacing = 1; 26 | flow.minimumInteritemSpacing = 1; 27 | flow.itemSize = CGSizeMake(self.view.width-2, self.view.width-2); 28 | flow.sectionInset = UIEdgeInsetsMake(1, 1, 1, 1); 29 | _collectionView = [[UICollectionView alloc] initWithFrame:self.view.frame collectionViewLayout:flow]; 30 | _collectionView.delegate = self; 31 | _collectionView.dataSource = self; 32 | _collectionView.backgroundColor = [UIColor whiteColor]; 33 | [_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:reuseIdentifier]; 34 | [self.view addSubview:_collectionView]; 35 | } 36 | 37 | #pragma mark 38 | 39 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { 40 | return 1; 41 | } 42 | 43 | 44 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 45 | return 2; 46 | } 47 | 48 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 49 | UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath]; 50 | cell.backgroundColor = [UIColor colorWithRed:0 green:0.5 blue:1 alpha:1]; 51 | 52 | for (MLMProgressView *view in cell.subviews) { 53 | [view removeFromSuperview]; 54 | } 55 | switch (indexPath.row) { 56 | case 0: 57 | { 58 | MLMProgressView *progress = [[MLMProgressView alloc] initWithFrame:CGRectMake(0, 0, cell.width, cell.height)]; 59 | [cell addSubview:[progress sesameCreditType]]; 60 | [progress tapHandle:^{ 61 | [progress.circle setProgress:.8]; 62 | }]; 63 | } 64 | break; 65 | case 1: 66 | { 67 | MLMProgressView *progress = [[MLMProgressView alloc] initWithFrame:CGRectMake(0, 0, cell.width, cell.height)]; 68 | [cell addSubview:[progress speedDialType]]; 69 | [progress tapHandle:^{ 70 | [progress.circle setProgress:.6]; 71 | }]; 72 | } 73 | break; 74 | default: 75 | break; 76 | } 77 | 78 | return cell; 79 | } 80 | 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /MLMProgressView/WaterWaveVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // WaveWaterProgress 4 | // 5 | // Created by my on 2016/11/9. 6 | // Copyright © 2016年 my. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WaterWaveVC : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /MLMProgressView/WaterWaveVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // WaveWaterProgress 4 | // 5 | // Created by my on 2016/11/9. 6 | // Copyright © 2016年 my. All rights reserved. 7 | // 8 | 9 | #import "WaterWaveVC.h" 10 | #import "MLMWaveWaterView.h" 11 | #import "UIView+MLMBorderPath.h" 12 | 13 | @interface WaterWaveVC () 14 | { 15 | MLMWaveWaterView *waterView; 16 | } 17 | @end 18 | 19 | @implementation WaterWaveVC 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | // Do any additional setup after loading the view, typically from a nib. 24 | 25 | waterView = [[MLMWaveWaterView alloc] initWithFrame:CGRectMake(([UIScreen mainScreen].bounds.size.width - 200)/2, 70, 200,200)]; 26 | waterView.progress = .1; 27 | [self.view addSubview:waterView]; 28 | 29 | } 30 | 31 | - (IBAction)changProgress:(UISlider *)sender { 32 | [waterView setProgress:sender.value]; 33 | } 34 | - (IBAction)animationAction:(UISwitch *)sender { 35 | waterView.progress_animation = sender.on; 36 | } 37 | 38 | - (IBAction)borderTypeAction:(UISegmentedControl *)sender { 39 | 40 | CGRect rect = waterView.frame; 41 | 42 | switch (sender.selectedSegmentIndex) { 43 | case 0: 44 | { 45 | waterView.borderPath = nil; 46 | rect.size.height = rect.size.width; 47 | 48 | } 49 | break; 50 | case 1: 51 | { 52 | CGRect frame = waterView.bounds; 53 | frame.size.height = frame.size.width * 9 /10; 54 | waterView.changeFrame = frame; 55 | 56 | waterView.borderPath = [UIView heartPathRect:rect lineWidth:0]; 57 | waterView.border_fillColor = [UIColor groupTableViewBackgroundColor]; 58 | 59 | } 60 | break; 61 | case 2: 62 | { 63 | 64 | waterView.changeFrame = waterView.bounds; 65 | 66 | 67 | waterView.borderPath = [UIView circlePathRect:rect lineWidth:0]; 68 | waterView.border_fillColor = [UIColor groupTableViewBackgroundColor]; 69 | } 70 | break; 71 | case 3: 72 | { 73 | //五角星距离中心距离 74 | CGFloat redius_star = rect.size.width/2; 75 | 76 | CGFloat star_w = redius_star * sin(2*M_PI/5)*2; 77 | CGFloat star_h = redius_star * (sin(3*M_PI/10) + 1); 78 | 79 | //图形所在区域frame 80 | CGRect changeFrame = CGRectMake((rect.size.width -star_w)/2, 0, star_w, star_h); 81 | 82 | rect.size.height = star_h; 83 | 84 | waterView.changeFrame = changeFrame; 85 | 86 | waterView.borderPath = [UIView startPathRect:rect lineWidth:0]; 87 | waterView.border_fillColor = [UIColor groupTableViewBackgroundColor]; 88 | 89 | } 90 | break; 91 | default: 92 | break; 93 | } 94 | } 95 | 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /MLMProgressView/WaterWaveVC.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 | 26 | 27 | 28 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /MLMProgressView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MLMProgressView 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. 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 | -------------------------------------------------------------------------------- /MLMProgressViewTests/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 | -------------------------------------------------------------------------------- /MLMProgressViewTests/MLMProgressViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLMProgressViewTests.m 3 | // MLMProgressViewTests 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MLMProgressViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MLMProgressViewTests 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 | -------------------------------------------------------------------------------- /MLMProgressViewUITests/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 | -------------------------------------------------------------------------------- /MLMProgressViewUITests/MLMProgressViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLMProgressViewUITests.m 3 | // MLMProgressViewUITests 4 | // 5 | // Created by my on 16/8/4. 6 | // Copyright © 2016年 MS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MLMProgressViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MLMProgressViewUITests 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 | # MLMProgressCollection 2 | ###主要功能 3 | 4 | 1.水波 5 | 2.圆形进度条和刻度,也可以将两种进行组合 6 | 3.简单统计 7 | 8 | ###水波进度 9 | ####更新:添加borderPath 属性,可以自定义水波的容器,也在UIView+MLMBorderPath中提供了几种容器样式,使用者也可以自己在其中添加样式 10 | 11 | ![image](https://github.com/MengLiMing/MLMCircleProgress/blob/master/waterWave.gif) 12 | 13 | 使用 将 waterWave 文件夹拖入工程 14 | 15 | borderPath 边界path,水波的容器 16 | order_fillColor 容器填充色 17 | border_strokeColor 容器描边色 18 | 19 | topColor 深色水纹的颜色 20 | bottomColor 浅色水纹的颜色 21 | progress 设置进度(0-1) 22 | progress_animation 设置进度改变时是否使用动画,默认YES 23 | 24 | 25 | 其他属性可以微调水波的样式: 26 | wave_Amplitude 振幅,默认设置为view的1/20,具体可以自己设置 27 | wave_Cycle 周期,默认设置为一个周期是view宽度的0.9 28 | wave_distance 深色波纹和浅色波纹之间的偏移,默认偏移,一个周期宽度的0.8 29 | 30 | wave_scale 调节波纹速度 31 | progress_scale progress_animation设置为YES时调节动画速度 32 | 33 | 34 | ###仪表盘 35 | ![image](https://github.com/MengLiMing/MLMCircleProgress/blob/master/instrument.gif) 36 | 37 | MLMCalibrationView + MLMCircleView 实现不同样式的仪表盘 38 | 39 | 具体使用,我已经在MLMProgressView写了两种样式的例子,你也可以使用上述两种view进行组合 40 | 将 instrument 和 help 文件夹直接拖入工程 41 | 42 | 43 | ###统计 44 | ![image](https://github.com/MengLiMing/MLMCircleProgress/blob/master/Statistical.png) 45 | 46 | 使用 将 statistical 文件夹拖入工程 47 | 48 | ####待升级 49 | 50 | 1.进度条颜色渐变设置 51 | 2.刻度添加表针,能实现简单时钟效果最好 52 | 3.其它... 53 | 4.刻度表盘现有一bug需修复,设置度数0-360时,起点终点刻度值重叠 54 | 5.统计样式添加动画效果 55 | -------------------------------------------------------------------------------- /Statistical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/Statistical.png -------------------------------------------------------------------------------- /instrument.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/instrument.gif -------------------------------------------------------------------------------- /waterWave.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MengLiMing/MLMProgressCollection/6c50e0a8a2f71d8ee298d5545c2d8504cea29376/waterWave.gif --------------------------------------------------------------------------------