├── ADo_MinToMaxSlider.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ ├── duweixin.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── ADo_MinToMaxSlider.xcscheme │ │ └── xcschememanagement.plist │ └── dwx.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── ADo_MinToMaxSlider.xcscheme │ └── xcschememanagement.plist ├── ADo_MinToMaxSlider ├── ADo_MinToMaxSlider.gif ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── File │ ├── ADo_CircleView.h │ ├── ADo_CircleView.m │ ├── ADo_MinToMaxSlider.h │ ├── ADo_MinToMaxSlider.m │ ├── ADo_PopUpView.h │ ├── ADo_PopUpView.m │ ├── UIView+CornerMaskLayer.h │ ├── UIView+CornerMaskLayer.m │ ├── UIView+Tool.h │ └── UIView+Tool.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── ADo_MinToMaxSliderTests ├── ADo_MinToMaxSliderTests.m └── Info.plist ├── ADo_MinToMaxSliderUITests ├── ADo_MinToMaxSliderUITests.m └── Info.plist └── README.md /ADo_MinToMaxSlider.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1F4E0E5E1C0D477E009CC022 /* UIView+CornerMaskLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E0E5B1C0D477E009CC022 /* UIView+CornerMaskLayer.m */; }; 11 | 1F4E0E5F1C0D477E009CC022 /* UIView+Tool.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E0E5D1C0D477E009CC022 /* UIView+Tool.m */; }; 12 | 1F4E0E661C0D4791009CC022 /* ADo_CircleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E0E611C0D4791009CC022 /* ADo_CircleView.m */; }; 13 | 1F4E0E671C0D4791009CC022 /* ADo_MinToMaxSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E0E631C0D4791009CC022 /* ADo_MinToMaxSlider.m */; }; 14 | 1F4E0E681C0D4791009CC022 /* ADo_PopUpView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E0E651C0D4791009CC022 /* ADo_PopUpView.m */; }; 15 | 1F4E0E6A1C0D4B37009CC022 /* ADo_MinToMaxSlider.gif in Resources */ = {isa = PBXBuildFile; fileRef = 1F4E0E691C0D4B37009CC022 /* ADo_MinToMaxSlider.gif */; }; 16 | 1F8805701C07F52600C41B6E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F88056F1C07F52600C41B6E /* main.m */; }; 17 | 1F8805731C07F52600C41B6E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F8805721C07F52600C41B6E /* AppDelegate.m */; }; 18 | 1F8805761C07F52600C41B6E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F8805751C07F52600C41B6E /* ViewController.m */; }; 19 | 1F8805791C07F52600C41B6E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F8805771C07F52600C41B6E /* Main.storyboard */; }; 20 | 1F88057B1C07F52600C41B6E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1F88057A1C07F52600C41B6E /* Assets.xcassets */; }; 21 | 1F88057E1C07F52600C41B6E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F88057C1C07F52600C41B6E /* LaunchScreen.storyboard */; }; 22 | 1F8805891C07F52600C41B6E /* ADo_MinToMaxSliderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F8805881C07F52600C41B6E /* ADo_MinToMaxSliderTests.m */; }; 23 | 1F8805941C07F52600C41B6E /* ADo_MinToMaxSliderUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F8805931C07F52600C41B6E /* ADo_MinToMaxSliderUITests.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 1F8805851C07F52600C41B6E /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 1F8805631C07F52600C41B6E /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 1F88056A1C07F52600C41B6E; 32 | remoteInfo = ADo_MinToMaxSlider; 33 | }; 34 | 1F8805901C07F52600C41B6E /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 1F8805631C07F52600C41B6E /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 1F88056A1C07F52600C41B6E; 39 | remoteInfo = ADo_MinToMaxSlider; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 1F4E0E5A1C0D477E009CC022 /* UIView+CornerMaskLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+CornerMaskLayer.h"; sourceTree = ""; }; 45 | 1F4E0E5B1C0D477E009CC022 /* UIView+CornerMaskLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CornerMaskLayer.m"; sourceTree = ""; }; 46 | 1F4E0E5C1C0D477E009CC022 /* UIView+Tool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Tool.h"; sourceTree = ""; }; 47 | 1F4E0E5D1C0D477E009CC022 /* UIView+Tool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Tool.m"; sourceTree = ""; }; 48 | 1F4E0E601C0D4791009CC022 /* ADo_CircleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADo_CircleView.h; sourceTree = ""; }; 49 | 1F4E0E611C0D4791009CC022 /* ADo_CircleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADo_CircleView.m; sourceTree = ""; }; 50 | 1F4E0E621C0D4791009CC022 /* ADo_MinToMaxSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADo_MinToMaxSlider.h; sourceTree = ""; }; 51 | 1F4E0E631C0D4791009CC022 /* ADo_MinToMaxSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADo_MinToMaxSlider.m; sourceTree = ""; }; 52 | 1F4E0E641C0D4791009CC022 /* ADo_PopUpView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADo_PopUpView.h; sourceTree = ""; }; 53 | 1F4E0E651C0D4791009CC022 /* ADo_PopUpView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADo_PopUpView.m; sourceTree = ""; }; 54 | 1F4E0E691C0D4B37009CC022 /* ADo_MinToMaxSlider.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = ADo_MinToMaxSlider.gif; sourceTree = ""; }; 55 | 1F88056B1C07F52600C41B6E /* ADo_MinToMaxSlider.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ADo_MinToMaxSlider.app; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 1F88056F1C07F52600C41B6E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 57 | 1F8805711C07F52600C41B6E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 58 | 1F8805721C07F52600C41B6E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 59 | 1F8805741C07F52600C41B6E /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 60 | 1F8805751C07F52600C41B6E /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 61 | 1F8805781C07F52600C41B6E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 62 | 1F88057A1C07F52600C41B6E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 63 | 1F88057D1C07F52600C41B6E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 64 | 1F88057F1C07F52600C41B6E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 65 | 1F8805841C07F52600C41B6E /* ADo_MinToMaxSliderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ADo_MinToMaxSliderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | 1F8805881C07F52600C41B6E /* ADo_MinToMaxSliderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADo_MinToMaxSliderTests.m; sourceTree = ""; }; 67 | 1F88058A1C07F52600C41B6E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 68 | 1F88058F1C07F52600C41B6E /* ADo_MinToMaxSliderUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ADo_MinToMaxSliderUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | 1F8805931C07F52600C41B6E /* ADo_MinToMaxSliderUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ADo_MinToMaxSliderUITests.m; sourceTree = ""; }; 70 | 1F8805951C07F52600C41B6E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | /* End PBXFileReference section */ 72 | 73 | /* Begin PBXFrameworksBuildPhase section */ 74 | 1F8805681C07F52600C41B6E /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 1F8805811C07F52600C41B6E /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | 1F88058C1C07F52600C41B6E /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 1F4E0E581C0D46EA009CC022 /* File */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 1F4E0E621C0D4791009CC022 /* ADo_MinToMaxSlider.h */, 102 | 1F4E0E631C0D4791009CC022 /* ADo_MinToMaxSlider.m */, 103 | 1F4E0E641C0D4791009CC022 /* ADo_PopUpView.h */, 104 | 1F4E0E651C0D4791009CC022 /* ADo_PopUpView.m */, 105 | 1F4E0E601C0D4791009CC022 /* ADo_CircleView.h */, 106 | 1F4E0E611C0D4791009CC022 /* ADo_CircleView.m */, 107 | 1F4E0E5A1C0D477E009CC022 /* UIView+CornerMaskLayer.h */, 108 | 1F4E0E5B1C0D477E009CC022 /* UIView+CornerMaskLayer.m */, 109 | 1F4E0E5C1C0D477E009CC022 /* UIView+Tool.h */, 110 | 1F4E0E5D1C0D477E009CC022 /* UIView+Tool.m */, 111 | ); 112 | path = File; 113 | sourceTree = ""; 114 | }; 115 | 1F8805621C07F52600C41B6E = { 116 | isa = PBXGroup; 117 | children = ( 118 | 1F88056D1C07F52600C41B6E /* ADo_MinToMaxSlider */, 119 | 1F8805871C07F52600C41B6E /* ADo_MinToMaxSliderTests */, 120 | 1F8805921C07F52600C41B6E /* ADo_MinToMaxSliderUITests */, 121 | 1F88056C1C07F52600C41B6E /* Products */, 122 | ); 123 | sourceTree = ""; 124 | }; 125 | 1F88056C1C07F52600C41B6E /* Products */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 1F88056B1C07F52600C41B6E /* ADo_MinToMaxSlider.app */, 129 | 1F8805841C07F52600C41B6E /* ADo_MinToMaxSliderTests.xctest */, 130 | 1F88058F1C07F52600C41B6E /* ADo_MinToMaxSliderUITests.xctest */, 131 | ); 132 | name = Products; 133 | sourceTree = ""; 134 | }; 135 | 1F88056D1C07F52600C41B6E /* ADo_MinToMaxSlider */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 1F4E0E581C0D46EA009CC022 /* File */, 139 | 1F8805711C07F52600C41B6E /* AppDelegate.h */, 140 | 1F8805721C07F52600C41B6E /* AppDelegate.m */, 141 | 1F8805741C07F52600C41B6E /* ViewController.h */, 142 | 1F8805751C07F52600C41B6E /* ViewController.m */, 143 | 1F4E0E691C0D4B37009CC022 /* ADo_MinToMaxSlider.gif */, 144 | 1F8805771C07F52600C41B6E /* Main.storyboard */, 145 | 1F88057A1C07F52600C41B6E /* Assets.xcassets */, 146 | 1F88057C1C07F52600C41B6E /* LaunchScreen.storyboard */, 147 | 1F88057F1C07F52600C41B6E /* Info.plist */, 148 | 1F88056E1C07F52600C41B6E /* Supporting Files */, 149 | ); 150 | path = ADo_MinToMaxSlider; 151 | sourceTree = ""; 152 | }; 153 | 1F88056E1C07F52600C41B6E /* Supporting Files */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 1F88056F1C07F52600C41B6E /* main.m */, 157 | ); 158 | name = "Supporting Files"; 159 | sourceTree = ""; 160 | }; 161 | 1F8805871C07F52600C41B6E /* ADo_MinToMaxSliderTests */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 1F8805881C07F52600C41B6E /* ADo_MinToMaxSliderTests.m */, 165 | 1F88058A1C07F52600C41B6E /* Info.plist */, 166 | ); 167 | path = ADo_MinToMaxSliderTests; 168 | sourceTree = ""; 169 | }; 170 | 1F8805921C07F52600C41B6E /* ADo_MinToMaxSliderUITests */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 1F8805931C07F52600C41B6E /* ADo_MinToMaxSliderUITests.m */, 174 | 1F8805951C07F52600C41B6E /* Info.plist */, 175 | ); 176 | path = ADo_MinToMaxSliderUITests; 177 | sourceTree = ""; 178 | }; 179 | /* End PBXGroup section */ 180 | 181 | /* Begin PBXNativeTarget section */ 182 | 1F88056A1C07F52600C41B6E /* ADo_MinToMaxSlider */ = { 183 | isa = PBXNativeTarget; 184 | buildConfigurationList = 1F8805981C07F52600C41B6E /* Build configuration list for PBXNativeTarget "ADo_MinToMaxSlider" */; 185 | buildPhases = ( 186 | 1F8805671C07F52600C41B6E /* Sources */, 187 | 1F8805681C07F52600C41B6E /* Frameworks */, 188 | 1F8805691C07F52600C41B6E /* Resources */, 189 | ); 190 | buildRules = ( 191 | ); 192 | dependencies = ( 193 | ); 194 | name = ADo_MinToMaxSlider; 195 | productName = ADo_MinToMaxSlider; 196 | productReference = 1F88056B1C07F52600C41B6E /* ADo_MinToMaxSlider.app */; 197 | productType = "com.apple.product-type.application"; 198 | }; 199 | 1F8805831C07F52600C41B6E /* ADo_MinToMaxSliderTests */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = 1F88059B1C07F52600C41B6E /* Build configuration list for PBXNativeTarget "ADo_MinToMaxSliderTests" */; 202 | buildPhases = ( 203 | 1F8805801C07F52600C41B6E /* Sources */, 204 | 1F8805811C07F52600C41B6E /* Frameworks */, 205 | 1F8805821C07F52600C41B6E /* Resources */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | 1F8805861C07F52600C41B6E /* PBXTargetDependency */, 211 | ); 212 | name = ADo_MinToMaxSliderTests; 213 | productName = ADo_MinToMaxSliderTests; 214 | productReference = 1F8805841C07F52600C41B6E /* ADo_MinToMaxSliderTests.xctest */; 215 | productType = "com.apple.product-type.bundle.unit-test"; 216 | }; 217 | 1F88058E1C07F52600C41B6E /* ADo_MinToMaxSliderUITests */ = { 218 | isa = PBXNativeTarget; 219 | buildConfigurationList = 1F88059E1C07F52600C41B6E /* Build configuration list for PBXNativeTarget "ADo_MinToMaxSliderUITests" */; 220 | buildPhases = ( 221 | 1F88058B1C07F52600C41B6E /* Sources */, 222 | 1F88058C1C07F52600C41B6E /* Frameworks */, 223 | 1F88058D1C07F52600C41B6E /* Resources */, 224 | ); 225 | buildRules = ( 226 | ); 227 | dependencies = ( 228 | 1F8805911C07F52600C41B6E /* PBXTargetDependency */, 229 | ); 230 | name = ADo_MinToMaxSliderUITests; 231 | productName = ADo_MinToMaxSliderUITests; 232 | productReference = 1F88058F1C07F52600C41B6E /* ADo_MinToMaxSliderUITests.xctest */; 233 | productType = "com.apple.product-type.bundle.ui-testing"; 234 | }; 235 | /* End PBXNativeTarget section */ 236 | 237 | /* Begin PBXProject section */ 238 | 1F8805631C07F52600C41B6E /* Project object */ = { 239 | isa = PBXProject; 240 | attributes = { 241 | LastUpgradeCheck = 0710; 242 | ORGANIZATIONNAME = Nododo; 243 | TargetAttributes = { 244 | 1F88056A1C07F52600C41B6E = { 245 | CreatedOnToolsVersion = 7.1; 246 | }; 247 | 1F8805831C07F52600C41B6E = { 248 | CreatedOnToolsVersion = 7.1; 249 | TestTargetID = 1F88056A1C07F52600C41B6E; 250 | }; 251 | 1F88058E1C07F52600C41B6E = { 252 | CreatedOnToolsVersion = 7.1; 253 | TestTargetID = 1F88056A1C07F52600C41B6E; 254 | }; 255 | }; 256 | }; 257 | buildConfigurationList = 1F8805661C07F52600C41B6E /* Build configuration list for PBXProject "ADo_MinToMaxSlider" */; 258 | compatibilityVersion = "Xcode 3.2"; 259 | developmentRegion = English; 260 | hasScannedForEncodings = 0; 261 | knownRegions = ( 262 | en, 263 | Base, 264 | ); 265 | mainGroup = 1F8805621C07F52600C41B6E; 266 | productRefGroup = 1F88056C1C07F52600C41B6E /* Products */; 267 | projectDirPath = ""; 268 | projectRoot = ""; 269 | targets = ( 270 | 1F88056A1C07F52600C41B6E /* ADo_MinToMaxSlider */, 271 | 1F8805831C07F52600C41B6E /* ADo_MinToMaxSliderTests */, 272 | 1F88058E1C07F52600C41B6E /* ADo_MinToMaxSliderUITests */, 273 | ); 274 | }; 275 | /* End PBXProject section */ 276 | 277 | /* Begin PBXResourcesBuildPhase section */ 278 | 1F8805691C07F52600C41B6E /* Resources */ = { 279 | isa = PBXResourcesBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | 1F88057E1C07F52600C41B6E /* LaunchScreen.storyboard in Resources */, 283 | 1F4E0E6A1C0D4B37009CC022 /* ADo_MinToMaxSlider.gif in Resources */, 284 | 1F88057B1C07F52600C41B6E /* Assets.xcassets in Resources */, 285 | 1F8805791C07F52600C41B6E /* Main.storyboard in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | 1F8805821C07F52600C41B6E /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | 1F88058D1C07F52600C41B6E /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXResourcesBuildPhase section */ 304 | 305 | /* Begin PBXSourcesBuildPhase section */ 306 | 1F8805671C07F52600C41B6E /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | 1F8805761C07F52600C41B6E /* ViewController.m in Sources */, 311 | 1F4E0E681C0D4791009CC022 /* ADo_PopUpView.m in Sources */, 312 | 1F4E0E671C0D4791009CC022 /* ADo_MinToMaxSlider.m in Sources */, 313 | 1F4E0E661C0D4791009CC022 /* ADo_CircleView.m in Sources */, 314 | 1F8805731C07F52600C41B6E /* AppDelegate.m in Sources */, 315 | 1F4E0E5F1C0D477E009CC022 /* UIView+Tool.m in Sources */, 316 | 1F4E0E5E1C0D477E009CC022 /* UIView+CornerMaskLayer.m in Sources */, 317 | 1F8805701C07F52600C41B6E /* main.m in Sources */, 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | 1F8805801C07F52600C41B6E /* Sources */ = { 322 | isa = PBXSourcesBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | 1F8805891C07F52600C41B6E /* ADo_MinToMaxSliderTests.m in Sources */, 326 | ); 327 | runOnlyForDeploymentPostprocessing = 0; 328 | }; 329 | 1F88058B1C07F52600C41B6E /* Sources */ = { 330 | isa = PBXSourcesBuildPhase; 331 | buildActionMask = 2147483647; 332 | files = ( 333 | 1F8805941C07F52600C41B6E /* ADo_MinToMaxSliderUITests.m in Sources */, 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | }; 337 | /* End PBXSourcesBuildPhase section */ 338 | 339 | /* Begin PBXTargetDependency section */ 340 | 1F8805861C07F52600C41B6E /* PBXTargetDependency */ = { 341 | isa = PBXTargetDependency; 342 | target = 1F88056A1C07F52600C41B6E /* ADo_MinToMaxSlider */; 343 | targetProxy = 1F8805851C07F52600C41B6E /* PBXContainerItemProxy */; 344 | }; 345 | 1F8805911C07F52600C41B6E /* PBXTargetDependency */ = { 346 | isa = PBXTargetDependency; 347 | target = 1F88056A1C07F52600C41B6E /* ADo_MinToMaxSlider */; 348 | targetProxy = 1F8805901C07F52600C41B6E /* PBXContainerItemProxy */; 349 | }; 350 | /* End PBXTargetDependency section */ 351 | 352 | /* Begin PBXVariantGroup section */ 353 | 1F8805771C07F52600C41B6E /* Main.storyboard */ = { 354 | isa = PBXVariantGroup; 355 | children = ( 356 | 1F8805781C07F52600C41B6E /* Base */, 357 | ); 358 | name = Main.storyboard; 359 | sourceTree = ""; 360 | }; 361 | 1F88057C1C07F52600C41B6E /* LaunchScreen.storyboard */ = { 362 | isa = PBXVariantGroup; 363 | children = ( 364 | 1F88057D1C07F52600C41B6E /* Base */, 365 | ); 366 | name = LaunchScreen.storyboard; 367 | sourceTree = ""; 368 | }; 369 | /* End PBXVariantGroup section */ 370 | 371 | /* Begin XCBuildConfiguration section */ 372 | 1F8805961C07F52600C41B6E /* Debug */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ALWAYS_SEARCH_USER_PATHS = NO; 376 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 377 | CLANG_CXX_LIBRARY = "libc++"; 378 | CLANG_ENABLE_MODULES = YES; 379 | CLANG_ENABLE_OBJC_ARC = YES; 380 | CLANG_WARN_BOOL_CONVERSION = YES; 381 | CLANG_WARN_CONSTANT_CONVERSION = YES; 382 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 383 | CLANG_WARN_EMPTY_BODY = YES; 384 | CLANG_WARN_ENUM_CONVERSION = YES; 385 | CLANG_WARN_INT_CONVERSION = YES; 386 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 387 | CLANG_WARN_UNREACHABLE_CODE = YES; 388 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 389 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 390 | COPY_PHASE_STRIP = NO; 391 | DEBUG_INFORMATION_FORMAT = dwarf; 392 | ENABLE_STRICT_OBJC_MSGSEND = YES; 393 | ENABLE_TESTABILITY = YES; 394 | GCC_C_LANGUAGE_STANDARD = gnu99; 395 | GCC_DYNAMIC_NO_PIC = NO; 396 | GCC_NO_COMMON_BLOCKS = YES; 397 | GCC_OPTIMIZATION_LEVEL = 0; 398 | GCC_PREPROCESSOR_DEFINITIONS = ( 399 | "DEBUG=1", 400 | "$(inherited)", 401 | ); 402 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 403 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 404 | GCC_WARN_UNDECLARED_SELECTOR = YES; 405 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 406 | GCC_WARN_UNUSED_FUNCTION = YES; 407 | GCC_WARN_UNUSED_VARIABLE = YES; 408 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 409 | MTL_ENABLE_DEBUG_INFO = YES; 410 | ONLY_ACTIVE_ARCH = YES; 411 | SDKROOT = iphoneos; 412 | TARGETED_DEVICE_FAMILY = "1,2"; 413 | }; 414 | name = Debug; 415 | }; 416 | 1F8805971C07F52600C41B6E /* Release */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ALWAYS_SEARCH_USER_PATHS = NO; 420 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 421 | CLANG_CXX_LIBRARY = "libc++"; 422 | CLANG_ENABLE_MODULES = YES; 423 | CLANG_ENABLE_OBJC_ARC = YES; 424 | CLANG_WARN_BOOL_CONVERSION = YES; 425 | CLANG_WARN_CONSTANT_CONVERSION = YES; 426 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 427 | CLANG_WARN_EMPTY_BODY = YES; 428 | CLANG_WARN_ENUM_CONVERSION = YES; 429 | CLANG_WARN_INT_CONVERSION = YES; 430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 431 | CLANG_WARN_UNREACHABLE_CODE = YES; 432 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 433 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 434 | COPY_PHASE_STRIP = NO; 435 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 436 | ENABLE_NS_ASSERTIONS = NO; 437 | ENABLE_STRICT_OBJC_MSGSEND = YES; 438 | GCC_C_LANGUAGE_STANDARD = gnu99; 439 | GCC_NO_COMMON_BLOCKS = YES; 440 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 441 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 442 | GCC_WARN_UNDECLARED_SELECTOR = YES; 443 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 444 | GCC_WARN_UNUSED_FUNCTION = YES; 445 | GCC_WARN_UNUSED_VARIABLE = YES; 446 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 447 | MTL_ENABLE_DEBUG_INFO = NO; 448 | SDKROOT = iphoneos; 449 | TARGETED_DEVICE_FAMILY = "1,2"; 450 | VALIDATE_PRODUCT = YES; 451 | }; 452 | name = Release; 453 | }; 454 | 1F8805991C07F52600C41B6E /* Debug */ = { 455 | isa = XCBuildConfiguration; 456 | buildSettings = { 457 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 458 | INFOPLIST_FILE = ADo_MinToMaxSlider/Info.plist; 459 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 460 | PRODUCT_BUNDLE_IDENTIFIER = "com.VALVE.www.ADo-MinToMaxSlider"; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | }; 463 | name = Debug; 464 | }; 465 | 1F88059A1C07F52600C41B6E /* Release */ = { 466 | isa = XCBuildConfiguration; 467 | buildSettings = { 468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 469 | INFOPLIST_FILE = ADo_MinToMaxSlider/Info.plist; 470 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 471 | PRODUCT_BUNDLE_IDENTIFIER = "com.VALVE.www.ADo-MinToMaxSlider"; 472 | PRODUCT_NAME = "$(TARGET_NAME)"; 473 | }; 474 | name = Release; 475 | }; 476 | 1F88059C1C07F52600C41B6E /* Debug */ = { 477 | isa = XCBuildConfiguration; 478 | buildSettings = { 479 | BUNDLE_LOADER = "$(TEST_HOST)"; 480 | INFOPLIST_FILE = ADo_MinToMaxSliderTests/Info.plist; 481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 482 | PRODUCT_BUNDLE_IDENTIFIER = "com.VALVE.www.ADo-MinToMaxSliderTests"; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ADo_MinToMaxSlider.app/ADo_MinToMaxSlider"; 485 | }; 486 | name = Debug; 487 | }; 488 | 1F88059D1C07F52600C41B6E /* Release */ = { 489 | isa = XCBuildConfiguration; 490 | buildSettings = { 491 | BUNDLE_LOADER = "$(TEST_HOST)"; 492 | INFOPLIST_FILE = ADo_MinToMaxSliderTests/Info.plist; 493 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 494 | PRODUCT_BUNDLE_IDENTIFIER = "com.VALVE.www.ADo-MinToMaxSliderTests"; 495 | PRODUCT_NAME = "$(TARGET_NAME)"; 496 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ADo_MinToMaxSlider.app/ADo_MinToMaxSlider"; 497 | }; 498 | name = Release; 499 | }; 500 | 1F88059F1C07F52600C41B6E /* Debug */ = { 501 | isa = XCBuildConfiguration; 502 | buildSettings = { 503 | INFOPLIST_FILE = ADo_MinToMaxSliderUITests/Info.plist; 504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 505 | PRODUCT_BUNDLE_IDENTIFIER = "com.VALVE.www.ADo-MinToMaxSliderUITests"; 506 | PRODUCT_NAME = "$(TARGET_NAME)"; 507 | TEST_TARGET_NAME = ADo_MinToMaxSlider; 508 | USES_XCTRUNNER = YES; 509 | }; 510 | name = Debug; 511 | }; 512 | 1F8805A01C07F52600C41B6E /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | buildSettings = { 515 | INFOPLIST_FILE = ADo_MinToMaxSliderUITests/Info.plist; 516 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 517 | PRODUCT_BUNDLE_IDENTIFIER = "com.VALVE.www.ADo-MinToMaxSliderUITests"; 518 | PRODUCT_NAME = "$(TARGET_NAME)"; 519 | TEST_TARGET_NAME = ADo_MinToMaxSlider; 520 | USES_XCTRUNNER = YES; 521 | }; 522 | name = Release; 523 | }; 524 | /* End XCBuildConfiguration section */ 525 | 526 | /* Begin XCConfigurationList section */ 527 | 1F8805661C07F52600C41B6E /* Build configuration list for PBXProject "ADo_MinToMaxSlider" */ = { 528 | isa = XCConfigurationList; 529 | buildConfigurations = ( 530 | 1F8805961C07F52600C41B6E /* Debug */, 531 | 1F8805971C07F52600C41B6E /* Release */, 532 | ); 533 | defaultConfigurationIsVisible = 0; 534 | defaultConfigurationName = Release; 535 | }; 536 | 1F8805981C07F52600C41B6E /* Build configuration list for PBXNativeTarget "ADo_MinToMaxSlider" */ = { 537 | isa = XCConfigurationList; 538 | buildConfigurations = ( 539 | 1F8805991C07F52600C41B6E /* Debug */, 540 | 1F88059A1C07F52600C41B6E /* Release */, 541 | ); 542 | defaultConfigurationIsVisible = 0; 543 | defaultConfigurationName = Release; 544 | }; 545 | 1F88059B1C07F52600C41B6E /* Build configuration list for PBXNativeTarget "ADo_MinToMaxSliderTests" */ = { 546 | isa = XCConfigurationList; 547 | buildConfigurations = ( 548 | 1F88059C1C07F52600C41B6E /* Debug */, 549 | 1F88059D1C07F52600C41B6E /* Release */, 550 | ); 551 | defaultConfigurationIsVisible = 0; 552 | defaultConfigurationName = Release; 553 | }; 554 | 1F88059E1C07F52600C41B6E /* Build configuration list for PBXNativeTarget "ADo_MinToMaxSliderUITests" */ = { 555 | isa = XCConfigurationList; 556 | buildConfigurations = ( 557 | 1F88059F1C07F52600C41B6E /* Debug */, 558 | 1F8805A01C07F52600C41B6E /* Release */, 559 | ); 560 | defaultConfigurationIsVisible = 0; 561 | defaultConfigurationName = Release; 562 | }; 563 | /* End XCConfigurationList section */ 564 | }; 565 | rootObject = 1F8805631C07F52600C41B6E /* Project object */; 566 | } 567 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider.xcodeproj/xcuserdata/duweixin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider.xcodeproj/xcuserdata/duweixin.xcuserdatad/xcschemes/ADo_MinToMaxSlider.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 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider.xcodeproj/xcuserdata/duweixin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ADo_MinToMaxSlider.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1F88056A1C07F52600C41B6E 16 | 17 | primary 18 | 19 | 20 | 1F8805831C07F52600C41B6E 21 | 22 | primary 23 | 24 | 25 | 1F88058E1C07F52600C41B6E 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider.xcodeproj/xcuserdata/dwx.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider.xcodeproj/xcuserdata/dwx.xcuserdatad/xcschemes/ADo_MinToMaxSlider.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 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider.xcodeproj/xcuserdata/dwx.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ADo_MinToMaxSlider.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1F88056A1C07F52600C41B6E 16 | 17 | primary 18 | 19 | 20 | 1F8805831C07F52600C41B6E 21 | 22 | primary 23 | 24 | 25 | 1F88058E1C07F52600C41B6E 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/ADo_MinToMaxSlider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nododo/ADo_MinToMaxSlider/7fb0ea4b86300e7ed7725a712d76602b2c35b2db/ADo_MinToMaxSlider/ADo_MinToMaxSlider.gif -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/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 | } -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/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 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/ADo_CircleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_CircleView.h 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ADo_CircleView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/ADo_CircleView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_CircleView.m 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import "ADo_CircleView.h" 10 | #import "UIView+Tool.h" 11 | @implementation ADo_CircleView 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | self.backgroundColor = [UIColor clearColor]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)drawRect:(CGRect)rect { 23 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 24 | [[UIColor grayColor] set]; 25 | CGContextAddEllipseInRect(ctx, CGRectMake(1, 1, rect.size.width - 2, rect.size.height - 2)); 26 | CGContextSetLineWidth(ctx, 1); 27 | CGContextStrokePath(ctx); 28 | 29 | CGContextRef ctx1 = UIGraphicsGetCurrentContext(); 30 | [[UIColor whiteColor] set]; 31 | CGContextAddEllipseInRect(ctx1, CGRectMake(1, 1, rect.size.width - 2, rect.size.height - 2)); 32 | CGContextFillPath(ctx1); 33 | 34 | } 35 | 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/ADo_MinToMaxSlider.h: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_MinToMaxSlider.h 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ADo_MinToMaxSlider : UIView 12 | 13 | - (instancetype)initWithMaxValue:(int)maxValue; 14 | 15 | @property (nonatomic,copy)void(^minToMax)(int minValue,int maxValue); 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/ADo_MinToMaxSlider.m: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_MinToMaxSlider.m 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import "ADo_MinToMaxSlider.h" 10 | #import "UIView+Tool.h" 11 | #import "ADo_CircleView.h" 12 | #import "ADo_PopUpView.h" 13 | #import "UIView+CornerMaskLayer.h" 14 | 15 | static float const KPaddingW = 20.0f; 16 | static float const KPaddingH = 5.0f; 17 | static float const KProgressH = 10.0f; 18 | static float const KTitleH = 10.0f; 19 | static float const KCircleRadius = 30.0f; 20 | static float const KTitleFont = 10.0f; 21 | static float const KTolerateSpace = 5.0f; 22 | static float const KPopWidth = 50.0f; 23 | static float const KPopHeight = 25.0f; 24 | 25 | @interface ADo_MinToMaxSlider () 26 | 27 | @property (nonatomic,assign)int maxValue; 28 | @property (nonatomic,assign)int minValue; 29 | @property (nonatomic,assign)float minCircleCenterX; 30 | @property (nonatomic,assign)float maxCircleCenterX; 31 | /**无奈的参数 因为遮挡问题需要把当前控件移动到最前面 调用bringSubviewToFront这个方法,会触发layoutSubviews方法 这个方法 会重新布局*/ 32 | @property (nonatomic,assign)BOOL firstInit; 33 | 34 | @property (nonatomic,weak)UIView *progreesView; 35 | @property (nonatomic,weak)UIView *bottomView; 36 | 37 | @property (nonatomic,weak)ADo_CircleView *minView; 38 | @property (nonatomic,weak)ADo_CircleView *maxView; 39 | @property (nonatomic,weak)UILabel *zeroLabel; 40 | @property (nonatomic,weak)UILabel *quarterLabel; 41 | @property (nonatomic,weak)UILabel *threeQuarterLabel; 42 | @property (nonatomic,weak)UILabel *finalLabel; 43 | @property (nonatomic,weak)ADo_PopUpView *minPop; 44 | @property (nonatomic,weak)ADo_PopUpView *maxPop; 45 | 46 | @end 47 | 48 | @implementation ADo_MinToMaxSlider 49 | @synthesize maxValue = _maxValue; 50 | @synthesize minValue = _minValue; 51 | 52 | - (instancetype)initWithMaxValue:(int)maxValue; 53 | { 54 | self = [super init]; 55 | if (self) { 56 | self.maxValue = maxValue; 57 | [self initialize]; 58 | } 59 | return self; 60 | } 61 | 62 | - (int)maxValue 63 | { 64 | return _maxValue; 65 | } 66 | 67 | - (int)minValue 68 | { 69 | return _minValue; 70 | } 71 | 72 | - (void)setMaxValue:(int)maxValue 73 | { 74 | _maxValue = maxValue; 75 | } 76 | 77 | - (void)setMinValue:(int)minValue 78 | { 79 | _minValue = minValue; 80 | } 81 | 82 | - (void)initialize 83 | { 84 | //底部进度条 85 | UIView *bottomView = [[UIView alloc] init]; 86 | bottomView.backgroundColor = [UIColor grayColor]; 87 | [self addSubview:bottomView]; 88 | self.bottomView = bottomView; 89 | 90 | //长条 91 | UIView *progreesView = [[UIView alloc] init]; 92 | progreesView.backgroundColor = [UIColor cyanColor]; 93 | [self addSubview:progreesView]; 94 | self.progreesView = progreesView; 95 | 96 | //等比划分label显示 97 | [self arrangeLabel]; 98 | 99 | //最小值 100 | ADo_CircleView *minView = [[ADo_CircleView alloc] init]; 101 | [self addSubview:minView]; 102 | self.minView= minView; 103 | 104 | //最大值 105 | ADo_CircleView *maxView = [[ADo_CircleView alloc] init]; 106 | [self addSubview:maxView]; 107 | self.maxView = maxView; 108 | 109 | //最小显示框 110 | ADo_PopUpView *minPop = [[ADo_PopUpView alloc] init]; 111 | [minPop setText:@"0"]; 112 | [self addSubview:minPop]; 113 | self.minPop = minPop; 114 | 115 | //最大显示框 116 | ADo_PopUpView *maxPop = [[ADo_PopUpView alloc] init]; 117 | [maxPop setText:[NSString stringWithFormat:@"%d",self.maxValue]]; 118 | [self addSubview:maxPop]; 119 | self.maxPop = maxPop; 120 | 121 | [self addGesForCircleView]; 122 | 123 | [self bringSubviewToFront:maxView]; 124 | } 125 | 126 | - (void)arrangeLabel 127 | { 128 | UILabel *zeroLabel = [[UILabel alloc] init]; 129 | zeroLabel.text = @"0"; 130 | zeroLabel.textAlignment = NSTextAlignmentCenter; 131 | zeroLabel.font = [UIFont systemFontOfSize:KTitleFont]; 132 | [self addSubview:zeroLabel]; 133 | self.zeroLabel = zeroLabel; 134 | 135 | UILabel *quarterLabel = [[UILabel alloc] init]; 136 | quarterLabel.text = [NSString stringWithFormat:@"%d",self.maxValue / 3]; 137 | quarterLabel.textAlignment = NSTextAlignmentCenter; 138 | quarterLabel.font = [UIFont systemFontOfSize:KTitleFont]; 139 | [self addSubview:quarterLabel]; 140 | self.quarterLabel = quarterLabel; 141 | 142 | 143 | UILabel *threeQuarterLabel = [[UILabel alloc] init]; 144 | threeQuarterLabel.text = [NSString stringWithFormat:@"%d",self.maxValue * 2/ 3]; 145 | threeQuarterLabel.textAlignment = NSTextAlignmentCenter; 146 | threeQuarterLabel.font = [UIFont systemFontOfSize:KTitleFont]; 147 | [self addSubview:threeQuarterLabel]; 148 | self.threeQuarterLabel = threeQuarterLabel; 149 | 150 | UILabel *finalLabel = [[UILabel alloc] init]; 151 | finalLabel.text = [NSString stringWithFormat:@"%d",self.maxValue]; 152 | finalLabel.font = [UIFont systemFontOfSize:KTitleFont]; 153 | finalLabel.textAlignment = NSTextAlignmentCenter; 154 | [self addSubview:finalLabel]; 155 | self.finalLabel = finalLabel; 156 | } 157 | 158 | - (void)addGesForCircleView 159 | { 160 | UIPanGestureRecognizer *panForMin = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panTheMinCircle:)]; 161 | [self.minView addGestureRecognizer:panForMin]; 162 | 163 | UIPanGestureRecognizer *panForMax = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panTheMaxCircle:)]; 164 | [self.maxView addGestureRecognizer:panForMax]; 165 | 166 | } 167 | 168 | - (void)layoutSubviews 169 | { 170 | if (!self.firstInit) { 171 | self.bottomView.X = KPaddingW; 172 | self.bottomView.height = KProgressH; 173 | self.bottomView.centerY = self.height / 2; 174 | self.bottomView.width = self.width - KPaddingW * 2; 175 | [self.bottomView addCornerMaskLayerWithRadius:5.0f]; 176 | 177 | self.progreesView.X = KPaddingW; 178 | self.progreesView.height = KProgressH; 179 | self.progreesView.centerY = self.height / 2; 180 | self.progreesView.width = self.width - KPaddingW * 2; 181 | [self.progreesView addCornerMaskLayerWithRadius:5.0f]; 182 | 183 | self.zeroLabel.width = self.progreesView.width / 4; 184 | self.zeroLabel.centerX = KPaddingW; 185 | self.zeroLabel.height = KTitleH; 186 | self.zeroLabel.Y = self.progreesView.Y - KTitleH - KPaddingH; 187 | 188 | self.quarterLabel.width = self.progreesView.width / 4; 189 | self.quarterLabel.centerX = KPaddingW + self.progreesView.width / 3; 190 | self.quarterLabel.height = KTitleH; 191 | self.quarterLabel.Y = self.progreesView.Y - KTitleH - KPaddingH; 192 | 193 | self.threeQuarterLabel.width = self.progreesView.width / 4; 194 | self.threeQuarterLabel.centerX = KPaddingW + self.progreesView.width * 2 / 3; 195 | self.threeQuarterLabel.height = KTitleH; 196 | self.threeQuarterLabel.Y = self.progreesView.Y - KTitleH - KPaddingH; 197 | 198 | self.finalLabel.width = self.progreesView.width / 4; 199 | self.finalLabel.centerX = self.width - KPaddingW; 200 | self.finalLabel.height = KTitleH; 201 | self.finalLabel.Y = self.progreesView.Y - KTitleH - KPaddingH; 202 | 203 | self.minView.width = KCircleRadius; 204 | self.minView.centerX = KPaddingW; 205 | self.minView.height = KCircleRadius; 206 | self.minView.centerY = self.height / 2; 207 | self.minCircleCenterX = KPaddingW; 208 | 209 | self.minPop.width = KPopWidth; 210 | self.minPop.centerX = KPaddingW; 211 | self.minPop.height = KPopHeight; 212 | self.minPop.Y = self.minView.Y - KPopHeight - KPaddingH; 213 | 214 | self.maxView.width = KCircleRadius; 215 | self.maxView.centerX = self.width - KPaddingW; 216 | self.maxView.height = KCircleRadius; 217 | self.maxView.centerY = self.height / 2; 218 | self.maxCircleCenterX = self.width - KPaddingW; 219 | 220 | self.maxPop.width = KPopWidth; 221 | self.maxPop.centerX = self.width - KPaddingW; 222 | self.maxPop.height = KPopHeight; 223 | self.maxPop.Y = self.maxView.Y - KPopHeight - KPaddingH; 224 | 225 | self.firstInit = YES; 226 | } 227 | 228 | [super layoutSubviews]; 229 | 230 | } 231 | 232 | - (void)panTheMinCircle:(UIPanGestureRecognizer *)panTheMin 233 | { 234 | [self bringSubviewToFront:self.minView]; 235 | float tempMinCenterX = self.minCircleCenterX; 236 | CGPoint minPoint = [panTheMin translationInView:panTheMin.view]; 237 | float deltaX = minPoint.x; 238 | self.minCircleCenterX += deltaX; 239 | if (self.minCircleCenterX >= KPaddingW && self.minCircleCenterX <= self.maxCircleCenterX) { 240 | panTheMin.view.centerX = self.minCircleCenterX; 241 | self.progreesView.X = self.minCircleCenterX; 242 | self.progreesView.width -= deltaX; 243 | self.minPop.centerX = self.minCircleCenterX; 244 | int minValue = (int)(self.minCircleCenterX - KPaddingW) / (self.width - KPaddingW * 2) * self.maxValue; 245 | [self.minPop setText:[NSString stringWithFormat:@"%d",minValue]]; 246 | }else 247 | { 248 | self.minCircleCenterX = tempMinCenterX; 249 | 250 | } 251 | if (panTheMin.state == UIGestureRecognizerStateBegan) { 252 | [self.minPop popUp]; 253 | } 254 | if (panTheMin.state == UIGestureRecognizerStateEnded) { 255 | [self.minPop hide]; 256 | [self calculateValue]; 257 | } 258 | [panTheMin setTranslation:CGPointZero inView:panTheMin.view]; 259 | } 260 | 261 | - (void)panTheMaxCircle:(UIPanGestureRecognizer *)panTheMax 262 | { 263 | [self bringSubviewToFront:self.maxView]; 264 | float tempMaxCenterX = self.maxCircleCenterX; 265 | CGPoint minPoint = [panTheMax translationInView:panTheMax.view]; 266 | float deltaX = minPoint.x; 267 | self.maxCircleCenterX += deltaX; 268 | if (self.maxCircleCenterX >= self.minCircleCenterX && self.maxCircleCenterX <= self.width - KPaddingW) { 269 | panTheMax.view.centerX = self.maxCircleCenterX; 270 | self.progreesView.width += deltaX; 271 | self.maxPop.centerX = self.maxCircleCenterX; 272 | int maxValue = (int)(self.maxCircleCenterX - KPaddingW) / (self.width - KPaddingW * 2) * self.maxValue; 273 | [self.maxPop setText:[NSString stringWithFormat:@"%d",maxValue]]; 274 | }else 275 | { 276 | self.maxCircleCenterX = tempMaxCenterX; 277 | } 278 | if (panTheMax.state == UIGestureRecognizerStateBegan) { 279 | [self.maxPop popUp]; 280 | } 281 | if (panTheMax.state == UIGestureRecognizerStateEnded) { 282 | if (self.maxCircleCenterX < KPaddingW + KTolerateSpace) { 283 | [self resumMaxView]; 284 | } 285 | [self.maxPop hide]; 286 | [self calculateValue]; 287 | } 288 | [panTheMax setTranslation:CGPointZero inView:panTheMax.view]; 289 | } 290 | 291 | - (void)resumMaxView 292 | { 293 | self.maxCircleCenterX = self.width - KPaddingW; 294 | [UIView animateWithDuration:0.5f delay:0.5f options:UIViewAnimationOptionCurveEaseInOut animations:^{ 295 | self.maxView.centerX = self.width - KPaddingW; 296 | self.maxPop.centerX = self.width - KPaddingW; 297 | self.progreesView.width = self.maxCircleCenterX - self.minCircleCenterX; 298 | } completion:^(BOOL finished) { 299 | [self.maxPop setText:[NSString stringWithFormat:@"%d",self.maxValue]]; 300 | [self calculateValue]; 301 | }]; 302 | } 303 | 304 | - (void)calculateValue 305 | { 306 | int minValue = (int)(self.minCircleCenterX - KPaddingW) / (self.width - KPaddingW * 2) * self.maxValue; 307 | int maxValue = (int)(self.maxCircleCenterX - KPaddingW) / (self.width - KPaddingW * 2) * self.maxValue; 308 | if (self.minToMax) { 309 | self.minToMax(minValue,maxValue); 310 | } 311 | } 312 | 313 | @end 314 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/ADo_PopUpView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_PopUpView.h 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ADo_PopUpView : UIView 12 | 13 | @property (nonatomic,copy)NSString *text; 14 | 15 | - (void)popUp; 16 | - (void)hide; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/ADo_PopUpView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_PopUpView.m 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import "ADo_PopUpView.h" 10 | #import "UIView+Tool.h" 11 | 12 | @interface ADo_PopUpView () 13 | 14 | @property (nonatomic,strong)NSDictionary *attrs; 15 | 16 | @end 17 | 18 | //这个宏是为了只有一位数字时 该空间太小导致太难看了 19 | static float const KPaddingWidth = 5.0f; 20 | static float const KArrowHeight = 5.0f; 21 | static float const KArrowWidth = 5.0f; 22 | static float const KCornerRadius = 3.0f; 23 | static float const KTextHeight = 20.0f; 24 | static float const KTextFont = 13.0f; 25 | 26 | @implementation ADo_PopUpView 27 | 28 | - (instancetype)initWithFrame:(CGRect)frame 29 | { 30 | self = [super initWithFrame:frame]; 31 | if (self) { 32 | self.backgroundColor = [UIColor clearColor]; 33 | } 34 | return self; 35 | } 36 | 37 | - (NSDictionary *)attrs 38 | { 39 | if (!_attrs) { 40 | NSMutableParagraphStyle *style = [[NSParagraphStyle alloc] mutableCopy]; 41 | style.alignment = kCTTextAlignmentCenter; 42 | self.attrs = @{NSFontAttributeName : [UIFont fontWithName:@"AmericanTypewriter" size:KTextFont], 43 | NSForegroundColorAttributeName : [UIColor darkGrayColor], 44 | NSParagraphStyleAttributeName : style, 45 | }; 46 | } 47 | return _attrs; 48 | } 49 | 50 | - (void)drawRect:(CGRect)rect { 51 | float textWidth = [self calculateWidthWithString:self.text]; 52 | float textHalfWidth = textWidth / 2 + KPaddingWidth; 53 | float midX = self.width / 2; 54 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 55 | CGContextMoveToPoint(ctx, midX, 0); 56 | CGContextAddLineToPoint(ctx, midX + textHalfWidth - KCornerRadius, 0); 57 | CGContextAddArc(ctx, midX + textHalfWidth - KCornerRadius, KCornerRadius, KCornerRadius, - 0.5f * M_PI, 0, 0); 58 | CGContextAddLineToPoint(ctx, midX + textHalfWidth, KTextHeight - KCornerRadius); 59 | CGContextAddArc(ctx, midX + textHalfWidth - KCornerRadius, KTextHeight - KCornerRadius, KCornerRadius, 0, 0.5f * M_PI, 0); 60 | CGContextAddLineToPoint(ctx, midX + KArrowWidth / 2, KTextHeight); 61 | CGContextAddLineToPoint(ctx, midX, KTextHeight + KArrowHeight); 62 | CGContextAddLineToPoint(ctx, midX - KArrowWidth / 2, KTextHeight); 63 | CGContextAddLineToPoint(ctx, midX - textHalfWidth + KCornerRadius, KTextHeight); 64 | CGContextAddArc(ctx, midX - textHalfWidth + KCornerRadius, KTextHeight - KCornerRadius, KCornerRadius, 0.5f * M_PI, 1.0f * M_PI, 0); 65 | CGContextAddLineToPoint(ctx, midX - textHalfWidth, KCornerRadius); 66 | CGContextAddArc(ctx, midX - textHalfWidth + KCornerRadius, KCornerRadius, KCornerRadius, M_PI, 1.5f *M_PI, 0); 67 | CGContextAddLineToPoint(ctx, midX, 0); 68 | [[UIColor orangeColor] set]; 69 | CGContextFillPath(ctx); 70 | [self.text drawInRect:CGRectMake(midX - textHalfWidth - KPaddingWidth , 0, textWidth + 2 * KPaddingWidth, KTextHeight) withAttributes:self.attrs]; 71 | } 72 | 73 | - (void)setText:(NSString *)text 74 | { 75 | _text = text; 76 | [self setNeedsDisplay]; 77 | } 78 | 79 | - (float)calculateWidthWithString:(NSString *)string 80 | { 81 | NSDictionary *attDic = @{NSFontAttributeName : [UIFont systemFontOfSize:KTextFont]}; 82 | CGSize size =[string boundingRectWithSize:CGSizeMake(0, KTextHeight) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin attributes:attDic context:nil].size; 83 | return size.width; 84 | } 85 | 86 | - (void)popUp 87 | { 88 | CAKeyframeAnimation *scaleAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale"]; 89 | scaleAnimation.values = @[@1,@1.5f,@1.0f,@1.3f]; 90 | scaleAnimation.keyTimes = @[@0,@0.1f,@.4f,@.8,@1.0f]; 91 | scaleAnimation.duration = 0.5f; 92 | scaleAnimation.removedOnCompletion = NO; 93 | scaleAnimation.fillMode = kCAFillModeForwards; 94 | [self.layer addAnimation:scaleAnimation forKey:@"scale"]; 95 | } 96 | 97 | - (void)hide 98 | { 99 | [self.layer removeAnimationForKey:@"scale"]; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/UIView+CornerMaskLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+CornerMaskLayer.h 3 | // Meituan 4 | // 5 | // Created by 臧其龙 on 15/9/18. 6 | // Copyright (c) 2015年 臧其龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface UIView (CornerMaskLayer) 13 | 14 | - (void)addCornerMaskLayerWithRadius:(CGFloat)radius; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/UIView+CornerMaskLayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+CornerMaskLayer.m 3 | // Meituan 4 | // 5 | // Created by 臧其龙 on 15/9/18. 6 | // Copyright (c) 2015年 臧其龙. All rights reserved. 7 | // 8 | 9 | #import "UIView+CornerMaskLayer.h" 10 | 11 | 12 | @implementation UIView (CornerMaskLayer) 13 | 14 | - (void)addCornerMaskLayerWithRadius:(CGFloat)radius 15 | { 16 | CAShapeLayer *layer = [CAShapeLayer layer]; 17 | layer.path = [UIBezierPath bezierPathWithRoundedRect:self.bounds 18 | byRoundingCorners:UIRectCornerAllCorners 19 | cornerRadii:CGSizeMake(radius, radius)] 20 | .CGPath; 21 | self.layer.mask = layer; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/UIView+Tool.h: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_CircleView.h 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Tool) 12 | 13 | @property(nonatomic,assign) CGFloat centerX; 14 | @property(nonatomic,assign) CGFloat centerY; 15 | @property(nonatomic,assign) CGFloat X; 16 | @property(nonatomic,assign) CGFloat Y; 17 | @property(nonatomic,assign) CGFloat width; 18 | @property(nonatomic,assign) CGFloat height; 19 | @property(nonatomic,assign) CGSize size; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/File/UIView+Tool.m: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_CircleView.h 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import "UIView+Tool.h" 10 | 11 | @implementation UIView (Tool) 12 | 13 | - (void)setCenterX:(CGFloat)centerX 14 | { 15 | CGPoint center = self.center; 16 | center.x = centerX; 17 | self.center = center; 18 | } 19 | 20 | - (CGFloat)centerX 21 | { 22 | return self.center.x; 23 | } 24 | 25 | - (void)setCenterY:(CGFloat)centerY 26 | { 27 | CGPoint center = self.center; 28 | center.y = centerY; 29 | self.center = center; 30 | } 31 | 32 | - (CGFloat)centerY 33 | { 34 | return self.center.y; 35 | } 36 | 37 | - (void)setY:(CGFloat)Y 38 | { 39 | CGRect frameT = self.frame; 40 | frameT.origin.y = Y; 41 | self.frame = frameT; 42 | } 43 | 44 | - (CGFloat)Y 45 | { 46 | return self.frame.origin.y; 47 | } 48 | 49 | - (void)setX:(CGFloat)X 50 | { 51 | CGRect frameT = self.frame; 52 | frameT.origin.x = X; 53 | self.frame = frameT; 54 | } 55 | 56 | - (CGFloat)X 57 | { 58 | return self.frame.origin.x; 59 | } 60 | 61 | -(void)setWidth:(CGFloat)width 62 | { 63 | CGRect frameT = self.frame; 64 | frameT.size.width = width; 65 | self.frame = frameT; 66 | } 67 | 68 | - (CGFloat)width 69 | { 70 | return self.frame.size.width; 71 | } 72 | 73 | - (void)setHeight:(CGFloat)height 74 | { 75 | CGRect frameT = self.frame; 76 | frameT.size.height = height; 77 | self.frame = frameT; 78 | } 79 | 80 | - (CGFloat)height 81 | { 82 | return self.frame.size.height; 83 | } 84 | 85 | - (void)setSize:(CGSize)size 86 | { 87 | CGRect frameT = self.frame; 88 | frameT.size = size; 89 | self.frame = frameT; 90 | } 91 | 92 | - (CGSize)size 93 | { 94 | return self.frame.size; 95 | } 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ADo_MinToMaxSlider.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | ADo_MinToMaxSlider *slider = [[ADo_MinToMaxSlider alloc] initWithMaxValue:500]; 21 | slider.frame = CGRectMake(0, 100, self.view.frame.size.width, 100); 22 | [self.view addSubview:slider]; 23 | 24 | UILabel *minLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 200, 100, 100)]; 25 | minLabel.backgroundColor = [UIColor orangeColor]; 26 | minLabel.textAlignment = NSTextAlignmentCenter; 27 | [self.view addSubview:minLabel]; 28 | 29 | UILabel *maxLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.view.frame.size.width - 100, 200, 100, 100)]; 30 | maxLabel.backgroundColor = [UIColor yellowColor]; 31 | maxLabel.textAlignment = NSTextAlignmentCenter; 32 | [self.view addSubview:maxLabel]; 33 | 34 | slider.minToMax = ^(int minValue,int maxValue) 35 | { 36 | minLabel.text = [NSString stringWithFormat:@"%d",minValue]; 37 | maxLabel.text = [NSString stringWithFormat:@"%d",maxValue]; 38 | }; 39 | } 40 | @end 41 | -------------------------------------------------------------------------------- /ADo_MinToMaxSlider/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ADo_MinToMaxSlider 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. 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 | -------------------------------------------------------------------------------- /ADo_MinToMaxSliderTests/ADo_MinToMaxSliderTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_MinToMaxSliderTests.m 3 | // ADo_MinToMaxSliderTests 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ADo_MinToMaxSliderTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ADo_MinToMaxSliderTests 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 | -------------------------------------------------------------------------------- /ADo_MinToMaxSliderTests/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 | -------------------------------------------------------------------------------- /ADo_MinToMaxSliderUITests/ADo_MinToMaxSliderUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ADo_MinToMaxSliderUITests.m 3 | // ADo_MinToMaxSliderUITests 4 | // 5 | // Created by 杜维欣 on 15/11/27. 6 | // Copyright © 2015年 Nododo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ADo_MinToMaxSliderUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ADo_MinToMaxSliderUITests 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 | -------------------------------------------------------------------------------- /ADo_MinToMaxSliderUITests/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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ADo_MinToMaxSlider 2 | ![ADo_MinToMaxSlider](https://github.com/Nododo/ADo_MinToMaxSlider/blob/master/ADo_MinToMaxSlider/ADo_MinToMaxSlider.gif) 3 | [新浪微博:@杜维欣_](http://weibo.com/u/2386823145/home?topnav=1&wvr=6) 4 | --------------------------------------------------------------------------------