├── Progress Indicator Swift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── Progress Indicator Swift.xccheckout └── xcuserdata │ └── Dan.xcuserdatad │ └── xcschemes │ ├── Progress Indicator Swift.xcscheme │ └── xcschememanagement.plist ├── Progress Indicator Swift ├── AppDelegate.swift ├── Base.lproj │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── LaunchImage.launchimage │ │ └── Contents.json │ └── Texture.imageset │ │ ├── Contents.json │ │ └── TextureX Stone Pebble Rocky Beach Grey Texture_800.jpg ├── Info.plist ├── ProgressIndicator.swift ├── ViewController.swift └── example.png ├── Progress Indicator SwiftTests ├── Info.plist └── Progress_Indicator_SwiftTests.swift └── README.md /Progress Indicator Swift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 370BE1E619A8C15E00B56309 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370BE1E519A8C15E00B56309 /* AppDelegate.swift */; }; 11 | 370BE1E819A8C15E00B56309 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370BE1E719A8C15E00B56309 /* ViewController.swift */; }; 12 | 370BE1EB19A8C15E00B56309 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 370BE1E919A8C15E00B56309 /* Main.storyboard */; }; 13 | 370BE1ED19A8C15E00B56309 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 370BE1EC19A8C15E00B56309 /* Images.xcassets */; }; 14 | 370BE1F919A8C15E00B56309 /* Progress_Indicator_SwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370BE1F819A8C15E00B56309 /* Progress_Indicator_SwiftTests.swift */; }; 15 | 370BE20319A8C1CE00B56309 /* ProgressIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370BE20219A8C1CE00B56309 /* ProgressIndicator.swift */; }; 16 | 3761150619AA171900DED361 /* example.png in Resources */ = {isa = PBXBuildFile; fileRef = 3761150519AA171900DED361 /* example.png */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 370BE1F319A8C15E00B56309 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 370BE1D819A8C15E00B56309 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 370BE1DF19A8C15E00B56309; 25 | remoteInfo = "Progress Indicator Swift"; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 370BE1E019A8C15E00B56309 /* Progress Indicator Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Progress Indicator Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 370BE1E419A8C15E00B56309 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 370BE1E519A8C15E00B56309 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33 | 370BE1E719A8C15E00B56309 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 34 | 370BE1EA19A8C15E00B56309 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 35 | 370BE1EC19A8C15E00B56309 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 36 | 370BE1F219A8C15E00B56309 /* Progress Indicator SwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Progress Indicator SwiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 370BE1F719A8C15E00B56309 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 370BE1F819A8C15E00B56309 /* Progress_Indicator_SwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Progress_Indicator_SwiftTests.swift; sourceTree = ""; }; 39 | 370BE20219A8C1CE00B56309 /* ProgressIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProgressIndicator.swift; sourceTree = ""; }; 40 | 3761150519AA171900DED361 /* example.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = example.png; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 370BE1DD19A8C15E00B56309 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | 370BE1EF19A8C15E00B56309 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 370BE1D719A8C15E00B56309 = { 62 | isa = PBXGroup; 63 | children = ( 64 | 370BE1E219A8C15E00B56309 /* Progress Indicator Swift */, 65 | 370BE1F519A8C15E00B56309 /* Progress Indicator SwiftTests */, 66 | 370BE1E119A8C15E00B56309 /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | 370BE1E119A8C15E00B56309 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 370BE1E019A8C15E00B56309 /* Progress Indicator Swift.app */, 74 | 370BE1F219A8C15E00B56309 /* Progress Indicator SwiftTests.xctest */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 370BE1E219A8C15E00B56309 /* Progress Indicator Swift */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 370BE20219A8C1CE00B56309 /* ProgressIndicator.swift */, 83 | 370BE1E519A8C15E00B56309 /* AppDelegate.swift */, 84 | 370BE1E719A8C15E00B56309 /* ViewController.swift */, 85 | 370BE1E919A8C15E00B56309 /* Main.storyboard */, 86 | 370BE1EC19A8C15E00B56309 /* Images.xcassets */, 87 | 370BE1E319A8C15E00B56309 /* Supporting Files */, 88 | ); 89 | path = "Progress Indicator Swift"; 90 | sourceTree = ""; 91 | }; 92 | 370BE1E319A8C15E00B56309 /* Supporting Files */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 3761150519AA171900DED361 /* example.png */, 96 | 370BE1E419A8C15E00B56309 /* Info.plist */, 97 | ); 98 | name = "Supporting Files"; 99 | sourceTree = ""; 100 | }; 101 | 370BE1F519A8C15E00B56309 /* Progress Indicator SwiftTests */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 370BE1F819A8C15E00B56309 /* Progress_Indicator_SwiftTests.swift */, 105 | 370BE1F619A8C15E00B56309 /* Supporting Files */, 106 | ); 107 | path = "Progress Indicator SwiftTests"; 108 | sourceTree = ""; 109 | }; 110 | 370BE1F619A8C15E00B56309 /* Supporting Files */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 370BE1F719A8C15E00B56309 /* Info.plist */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | 370BE1DF19A8C15E00B56309 /* Progress Indicator Swift */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = 370BE1FC19A8C15E00B56309 /* Build configuration list for PBXNativeTarget "Progress Indicator Swift" */; 124 | buildPhases = ( 125 | 370BE1DC19A8C15E00B56309 /* Sources */, 126 | 370BE1DD19A8C15E00B56309 /* Frameworks */, 127 | 370BE1DE19A8C15E00B56309 /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = "Progress Indicator Swift"; 134 | productName = "Progress Indicator Swift"; 135 | productReference = 370BE1E019A8C15E00B56309 /* Progress Indicator Swift.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | 370BE1F119A8C15E00B56309 /* Progress Indicator SwiftTests */ = { 139 | isa = PBXNativeTarget; 140 | buildConfigurationList = 370BE1FF19A8C15E00B56309 /* Build configuration list for PBXNativeTarget "Progress Indicator SwiftTests" */; 141 | buildPhases = ( 142 | 370BE1EE19A8C15E00B56309 /* Sources */, 143 | 370BE1EF19A8C15E00B56309 /* Frameworks */, 144 | 370BE1F019A8C15E00B56309 /* Resources */, 145 | ); 146 | buildRules = ( 147 | ); 148 | dependencies = ( 149 | 370BE1F419A8C15E00B56309 /* PBXTargetDependency */, 150 | ); 151 | name = "Progress Indicator SwiftTests"; 152 | productName = "Progress Indicator SwiftTests"; 153 | productReference = 370BE1F219A8C15E00B56309 /* Progress Indicator SwiftTests.xctest */; 154 | productType = "com.apple.product-type.bundle.unit-test"; 155 | }; 156 | /* End PBXNativeTarget section */ 157 | 158 | /* Begin PBXProject section */ 159 | 370BE1D819A8C15E00B56309 /* Project object */ = { 160 | isa = PBXProject; 161 | attributes = { 162 | LastUpgradeCheck = 0600; 163 | TargetAttributes = { 164 | 370BE1DF19A8C15E00B56309 = { 165 | CreatedOnToolsVersion = 6.0; 166 | }; 167 | 370BE1F119A8C15E00B56309 = { 168 | CreatedOnToolsVersion = 6.0; 169 | TestTargetID = 370BE1DF19A8C15E00B56309; 170 | }; 171 | }; 172 | }; 173 | buildConfigurationList = 370BE1DB19A8C15E00B56309 /* Build configuration list for PBXProject "Progress Indicator Swift" */; 174 | compatibilityVersion = "Xcode 3.2"; 175 | developmentRegion = English; 176 | hasScannedForEncodings = 0; 177 | knownRegions = ( 178 | en, 179 | Base, 180 | ); 181 | mainGroup = 370BE1D719A8C15E00B56309; 182 | productRefGroup = 370BE1E119A8C15E00B56309 /* Products */; 183 | projectDirPath = ""; 184 | projectRoot = ""; 185 | targets = ( 186 | 370BE1DF19A8C15E00B56309 /* Progress Indicator Swift */, 187 | 370BE1F119A8C15E00B56309 /* Progress Indicator SwiftTests */, 188 | ); 189 | }; 190 | /* End PBXProject section */ 191 | 192 | /* Begin PBXResourcesBuildPhase section */ 193 | 370BE1DE19A8C15E00B56309 /* Resources */ = { 194 | isa = PBXResourcesBuildPhase; 195 | buildActionMask = 2147483647; 196 | files = ( 197 | 3761150619AA171900DED361 /* example.png in Resources */, 198 | 370BE1EB19A8C15E00B56309 /* Main.storyboard in Resources */, 199 | 370BE1ED19A8C15E00B56309 /* Images.xcassets in Resources */, 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | }; 203 | 370BE1F019A8C15E00B56309 /* Resources */ = { 204 | isa = PBXResourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | /* End PBXResourcesBuildPhase section */ 211 | 212 | /* Begin PBXSourcesBuildPhase section */ 213 | 370BE1DC19A8C15E00B56309 /* Sources */ = { 214 | isa = PBXSourcesBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | 370BE1E819A8C15E00B56309 /* ViewController.swift in Sources */, 218 | 370BE20319A8C1CE00B56309 /* ProgressIndicator.swift in Sources */, 219 | 370BE1E619A8C15E00B56309 /* AppDelegate.swift in Sources */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | 370BE1EE19A8C15E00B56309 /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 370BE1F919A8C15E00B56309 /* Progress_Indicator_SwiftTests.swift in Sources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXSourcesBuildPhase section */ 232 | 233 | /* Begin PBXTargetDependency section */ 234 | 370BE1F419A8C15E00B56309 /* PBXTargetDependency */ = { 235 | isa = PBXTargetDependency; 236 | target = 370BE1DF19A8C15E00B56309 /* Progress Indicator Swift */; 237 | targetProxy = 370BE1F319A8C15E00B56309 /* PBXContainerItemProxy */; 238 | }; 239 | /* End PBXTargetDependency section */ 240 | 241 | /* Begin PBXVariantGroup section */ 242 | 370BE1E919A8C15E00B56309 /* Main.storyboard */ = { 243 | isa = PBXVariantGroup; 244 | children = ( 245 | 370BE1EA19A8C15E00B56309 /* Base */, 246 | ); 247 | name = Main.storyboard; 248 | sourceTree = ""; 249 | }; 250 | /* End PBXVariantGroup section */ 251 | 252 | /* Begin XCBuildConfiguration section */ 253 | 370BE1FA19A8C15E00B56309 /* Debug */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | ALWAYS_SEARCH_USER_PATHS = NO; 257 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 258 | CLANG_CXX_LIBRARY = "libc++"; 259 | CLANG_ENABLE_MODULES = YES; 260 | CLANG_ENABLE_OBJC_ARC = YES; 261 | CLANG_WARN_BOOL_CONVERSION = YES; 262 | CLANG_WARN_CONSTANT_CONVERSION = YES; 263 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 264 | CLANG_WARN_EMPTY_BODY = YES; 265 | CLANG_WARN_ENUM_CONVERSION = YES; 266 | CLANG_WARN_INT_CONVERSION = YES; 267 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 268 | CLANG_WARN_UNREACHABLE_CODE = YES; 269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 270 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 271 | COPY_PHASE_STRIP = NO; 272 | ENABLE_STRICT_OBJC_MSGSEND = YES; 273 | GCC_C_LANGUAGE_STANDARD = gnu99; 274 | GCC_DYNAMIC_NO_PIC = NO; 275 | GCC_OPTIMIZATION_LEVEL = 0; 276 | GCC_PREPROCESSOR_DEFINITIONS = ( 277 | "DEBUG=1", 278 | "$(inherited)", 279 | ); 280 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 281 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 282 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 283 | GCC_WARN_UNDECLARED_SELECTOR = YES; 284 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 285 | GCC_WARN_UNUSED_FUNCTION = YES; 286 | GCC_WARN_UNUSED_VARIABLE = YES; 287 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 288 | MTL_ENABLE_DEBUG_INFO = YES; 289 | ONLY_ACTIVE_ARCH = YES; 290 | SDKROOT = iphoneos; 291 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 292 | }; 293 | name = Debug; 294 | }; 295 | 370BE1FB19A8C15E00B56309 /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ALWAYS_SEARCH_USER_PATHS = NO; 299 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 300 | CLANG_CXX_LIBRARY = "libc++"; 301 | CLANG_ENABLE_MODULES = YES; 302 | CLANG_ENABLE_OBJC_ARC = YES; 303 | CLANG_WARN_BOOL_CONVERSION = YES; 304 | CLANG_WARN_CONSTANT_CONVERSION = YES; 305 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 306 | CLANG_WARN_EMPTY_BODY = YES; 307 | CLANG_WARN_ENUM_CONVERSION = YES; 308 | CLANG_WARN_INT_CONVERSION = YES; 309 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 310 | CLANG_WARN_UNREACHABLE_CODE = YES; 311 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 312 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 313 | COPY_PHASE_STRIP = YES; 314 | ENABLE_NS_ASSERTIONS = NO; 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | GCC_C_LANGUAGE_STANDARD = gnu99; 317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 318 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 319 | GCC_WARN_UNDECLARED_SELECTOR = YES; 320 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 321 | GCC_WARN_UNUSED_FUNCTION = YES; 322 | GCC_WARN_UNUSED_VARIABLE = YES; 323 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 324 | MTL_ENABLE_DEBUG_INFO = NO; 325 | SDKROOT = iphoneos; 326 | VALIDATE_PRODUCT = YES; 327 | }; 328 | name = Release; 329 | }; 330 | 370BE1FD19A8C15E00B56309 /* Debug */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 334 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 335 | INFOPLIST_FILE = "Progress Indicator Swift/Info.plist"; 336 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 337 | PRODUCT_NAME = "$(TARGET_NAME)"; 338 | }; 339 | name = Debug; 340 | }; 341 | 370BE1FE19A8C15E00B56309 /* Release */ = { 342 | isa = XCBuildConfiguration; 343 | buildSettings = { 344 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 345 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 346 | INFOPLIST_FILE = "Progress Indicator Swift/Info.plist"; 347 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 348 | PRODUCT_NAME = "$(TARGET_NAME)"; 349 | }; 350 | name = Release; 351 | }; 352 | 370BE20019A8C15E00B56309 /* Debug */ = { 353 | isa = XCBuildConfiguration; 354 | buildSettings = { 355 | BUNDLE_LOADER = "$(TEST_HOST)"; 356 | FRAMEWORK_SEARCH_PATHS = ( 357 | "$(SDKROOT)/Developer/Library/Frameworks", 358 | "$(inherited)", 359 | ); 360 | GCC_PREPROCESSOR_DEFINITIONS = ( 361 | "DEBUG=1", 362 | "$(inherited)", 363 | ); 364 | INFOPLIST_FILE = "Progress Indicator SwiftTests/Info.plist"; 365 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 366 | PRODUCT_NAME = "$(TARGET_NAME)"; 367 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Progress Indicator Swift.app/Progress Indicator Swift"; 368 | }; 369 | name = Debug; 370 | }; 371 | 370BE20119A8C15E00B56309 /* Release */ = { 372 | isa = XCBuildConfiguration; 373 | buildSettings = { 374 | BUNDLE_LOADER = "$(TEST_HOST)"; 375 | FRAMEWORK_SEARCH_PATHS = ( 376 | "$(SDKROOT)/Developer/Library/Frameworks", 377 | "$(inherited)", 378 | ); 379 | INFOPLIST_FILE = "Progress Indicator SwiftTests/Info.plist"; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 381 | PRODUCT_NAME = "$(TARGET_NAME)"; 382 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Progress Indicator Swift.app/Progress Indicator Swift"; 383 | }; 384 | name = Release; 385 | }; 386 | /* End XCBuildConfiguration section */ 387 | 388 | /* Begin XCConfigurationList section */ 389 | 370BE1DB19A8C15E00B56309 /* Build configuration list for PBXProject "Progress Indicator Swift" */ = { 390 | isa = XCConfigurationList; 391 | buildConfigurations = ( 392 | 370BE1FA19A8C15E00B56309 /* Debug */, 393 | 370BE1FB19A8C15E00B56309 /* Release */, 394 | ); 395 | defaultConfigurationIsVisible = 0; 396 | defaultConfigurationName = Release; 397 | }; 398 | 370BE1FC19A8C15E00B56309 /* Build configuration list for PBXNativeTarget "Progress Indicator Swift" */ = { 399 | isa = XCConfigurationList; 400 | buildConfigurations = ( 401 | 370BE1FD19A8C15E00B56309 /* Debug */, 402 | 370BE1FE19A8C15E00B56309 /* Release */, 403 | ); 404 | defaultConfigurationIsVisible = 0; 405 | defaultConfigurationName = Release; 406 | }; 407 | 370BE1FF19A8C15E00B56309 /* Build configuration list for PBXNativeTarget "Progress Indicator SwiftTests" */ = { 408 | isa = XCConfigurationList; 409 | buildConfigurations = ( 410 | 370BE20019A8C15E00B56309 /* Debug */, 411 | 370BE20119A8C15E00B56309 /* Release */, 412 | ); 413 | defaultConfigurationIsVisible = 0; 414 | defaultConfigurationName = Release; 415 | }; 416 | /* End XCConfigurationList section */ 417 | }; 418 | rootObject = 370BE1D819A8C15E00B56309 /* Project object */; 419 | } 420 | -------------------------------------------------------------------------------- /Progress Indicator Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Progress Indicator Swift.xcodeproj/project.xcworkspace/xcshareddata/Progress Indicator Swift.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | F7DB803D-6AD0-4B57-8032-E3A77AC610BB 9 | IDESourceControlProjectName 10 | Progress Indicator Swift 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 96A3F660913C50FB0C750D928EA32F2858ACC45B 14 | https://github.com/astrodan/Progress-Indicator-Swift.git 15 | 16 | IDESourceControlProjectPath 17 | Progress Indicator Swift.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 96A3F660913C50FB0C750D928EA32F2858ACC45B 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/astrodan/Progress-Indicator-Swift.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 96A3F660913C50FB0C750D928EA32F2858ACC45B 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 96A3F660913C50FB0C750D928EA32F2858ACC45B 36 | IDESourceControlWCCName 37 | Progress%20Indicator%20Swift 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Progress Indicator Swift.xcodeproj/xcuserdata/Dan.xcuserdatad/xcschemes/Progress Indicator Swift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Progress Indicator Swift.xcodeproj/xcuserdata/Dan.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Progress Indicator Swift.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 370BE1DF19A8C15E00B56309 16 | 17 | primary 18 | 19 | 20 | 370BE1F119A8C15E00B56309 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Progress Indicator Swift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Progress Indicator Swift 4 | // 5 | // Created by Dan on 23/08/2014. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication!) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication!) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication!) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication!) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication!) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Progress Indicator Swift/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /Progress Indicator Swift/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Progress Indicator Swift/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Progress Indicator Swift/Images.xcassets/Texture.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "TextureX Stone Pebble Rocky Beach Grey Texture_800.jpg" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Progress Indicator Swift/Images.xcassets/Texture.imageset/TextureX Stone Pebble Rocky Beach Grey Texture_800.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AstroDan/Progress-Indicator-Swift/8dc8fa3485d10bfd8b064b743c7d230b6fabd2d4/Progress Indicator Swift/Images.xcassets/Texture.imageset/TextureX Stone Pebble Rocky Beach Grey Texture_800.jpg -------------------------------------------------------------------------------- /Progress Indicator Swift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.yourcompany.$(PRODUCT_NAME:rfc1034identifier) 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 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Progress Indicator Swift/ProgressIndicator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressIndicator.swift 3 | // Progress Indicator Swift 4 | // 5 | // Created by Dan on 23/08/2014. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | @IBDesignable 12 | class ProgressIndicator: UIControl { 13 | 14 | // MARK: Properties 15 | 16 | @IBInspectable 17 | var steps:Int = 3 { 18 | didSet { 19 | self.setNeedsDisplay() 20 | } 21 | } 22 | 23 | @IBInspectable 24 | var selectedStep:Int = -1 { 25 | didSet { 26 | self.setNeedsDisplay() 27 | } 28 | } 29 | 30 | @IBInspectable 31 | var indicatorSize:CGFloat = 14.0 { 32 | didSet { 33 | self.setNeedsDisplay() 34 | } 35 | } 36 | 37 | @IBInspectable 38 | var lineWidth:CGFloat = 1.0 { 39 | didSet { 40 | self.adjustEdgeInsets() 41 | self.setNeedsDisplay() 42 | } 43 | } 44 | 45 | var edgeInsets:UIEdgeInsets = UIEdgeInsetsZero { 46 | didSet { 47 | self.adjustEdgeInsets() 48 | } 49 | } 50 | 51 | // MARK: Init 52 | 53 | override init(frame: CGRect) { 54 | super.init(frame: frame) 55 | self.adjustEdgeInsets() 56 | } 57 | 58 | required init(coder decoder: NSCoder) { 59 | super.init(coder: decoder) 60 | self.adjustEdgeInsets() 61 | } 62 | 63 | func adjustEdgeInsets() { 64 | if (self.edgeInsets.top < self.lineWidth/2) { 65 | edgeInsets = UIEdgeInsetsMake(self.lineWidth/2, self.edgeInsets.left, self.edgeInsets.bottom, self.edgeInsets.right) 66 | self.setNeedsDisplay() 67 | } 68 | if (self.edgeInsets.left < self.lineWidth/2) { 69 | edgeInsets = UIEdgeInsetsMake(self.edgeInsets.top, self.lineWidth/2, self.edgeInsets.bottom, self.edgeInsets.right); 70 | self.setNeedsDisplay() 71 | } 72 | if (self.edgeInsets.bottom < self.lineWidth/2) { 73 | edgeInsets = UIEdgeInsetsMake(self.edgeInsets.top, self.edgeInsets.left, self.lineWidth/2, self.edgeInsets.right); 74 | self.setNeedsDisplay() 75 | } 76 | if (self.edgeInsets.right < self.lineWidth/2) { 77 | edgeInsets = UIEdgeInsetsMake(self.edgeInsets.top, self.edgeInsets.left, self.edgeInsets.bottom, self.lineWidth/2); 78 | self.setNeedsDisplay() 79 | } 80 | } 81 | 82 | // MARK: Drawing 83 | 84 | func pathForStepWithIndex(step: Int) -> (UIBezierPath) { 85 | var delta = Float(self.frame.size.width - self.edgeInsets.left - self.edgeInsets.right - self.indicatorSize) 86 | var offset = Float(step) * (delta / Float(self.steps - 1)) 87 | var x = CGFloat( Double(self.edgeInsets.left) + Double(offset)) 88 | 89 | return UIBezierPath(ovalInRect:CGRectMake(x, self.edgeInsets.top, self.indicatorSize, self.indicatorSize)) 90 | } 91 | 92 | func linePathForStepWithIndex(step: Int) -> (UIBezierPath) { 93 | var delta = (Double(self.frame.size.width) - Double(self.edgeInsets.left) - Double(self.edgeInsets.right) - Double(self.indicatorSize)) / Double(self.steps - 1) 94 | var offset = Double(step) * delta 95 | var path = UIBezierPath() 96 | 97 | var x = Double(self.edgeInsets.left) + Double(self.indicatorSize) + offset 98 | var y = Double(self.edgeInsets.top) + Double(self.indicatorSize / 2) 99 | 100 | path.moveToPoint(CGPoint(x:x, y:y)) 101 | 102 | x = Double(self.edgeInsets.left) + Double(offset) + Double(delta) 103 | y = Double(self.edgeInsets.top) + Double(self.indicatorSize / 2) 104 | 105 | path.addLineToPoint(CGPoint(x:x, y:y)) 106 | 107 | return path; 108 | } 109 | 110 | override func drawRect(rect: CGRect) { 111 | self.tintColor.setStroke() 112 | 113 | for var i = 0; i < self.steps - 1; i++ { 114 | var linePath = self.linePathForStepWithIndex(i) 115 | linePath.lineWidth = self.lineWidth 116 | linePath.stroke() 117 | } 118 | 119 | for var i = 0; i < self.steps; i++ { 120 | var path = self.pathForStepWithIndex(i) 121 | 122 | (i == self.selectedStep) ? self.tintColor.setFill() : UIColor.clearColor().setFill(); 123 | path.fill(); 124 | 125 | path.lineWidth = self.lineWidth 126 | path.stroke() 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /Progress Indicator Swift/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Progress Indicator Swift 4 | // 5 | // Created by Dan on 23/08/2014. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet weak var progressIndicator: ProgressIndicator! 14 | 15 | @IBOutlet weak var progressIndicator2: ProgressIndicator! 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | // Do any additional setup after loading the view, typically from a nib. 19 | self.progressIndicator.tintColor = UIColor(patternImage: UIImage(named:"Texture")) 20 | self.progressIndicator2.backgroundColor = UIColor(patternImage: UIImage(named:"Texture")) 21 | self.progressIndicator2.edgeInsets = UIEdgeInsetsMake(14, 10, 14, 10) 22 | 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /Progress Indicator Swift/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AstroDan/Progress-Indicator-Swift/8dc8fa3485d10bfd8b064b743c7d230b6fabd2d4/Progress Indicator Swift/example.png -------------------------------------------------------------------------------- /Progress Indicator SwiftTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.yourcompany.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /Progress Indicator SwiftTests/Progress_Indicator_SwiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Progress_Indicator_SwiftTests.swift 3 | // Progress Indicator SwiftTests 4 | // 5 | // Created by Dan on 23/08/2014. 6 | // 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class Progress_Indicator_SwiftTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Progress-Indicator-Swift 2 | ======================== 3 | 4 | An indicator control used to show progress through a multi-step process, e.g. a sign-up process. 5 | 6 | ![example](https://github.com/astrodan/Progress-Indicator-Swift/blob/master/Progress%20Indicator%20Swift/example.png) 7 | --------------------------------------------------------------------------------