├── .gitignore ├── CCActivityIndicatorView.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── CCActivityIndicatorView ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── CCActivityIndicatorView.swift ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist └── ViewController.swift ├── CCActivityIndicatorViewTests ├── CCActivityIndicatorViewTests.swift └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | .DS_Store 20 | 21 | # CocoaPods 22 | # 23 | # We recommend against adding the Pods directory to your .gitignore. However 24 | # you should judge for yourself, the pros and cons are mentioned at: 25 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 26 | # 27 | # Pods/ 28 | -------------------------------------------------------------------------------- /CCActivityIndicatorView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 347C84F91A395B570008AE55 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347C84F81A395B570008AE55 /* AppDelegate.swift */; }; 11 | 347C84FB1A395B570008AE55 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347C84FA1A395B570008AE55 /* ViewController.swift */; }; 12 | 347C84FE1A395B570008AE55 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 347C84FC1A395B570008AE55 /* Main.storyboard */; }; 13 | 347C85001A395B570008AE55 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 347C84FF1A395B570008AE55 /* Images.xcassets */; }; 14 | 347C85031A395B570008AE55 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 347C85011A395B570008AE55 /* LaunchScreen.xib */; }; 15 | 347C850F1A395B570008AE55 /* CCActivityIndicatorViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347C850E1A395B570008AE55 /* CCActivityIndicatorViewTests.swift */; }; 16 | 347C851A1A395B7F0008AE55 /* CCActivityIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347C85191A395B7F0008AE55 /* CCActivityIndicatorView.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 347C85091A395B570008AE55 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 347C84EB1A395B570008AE55 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 347C84F21A395B570008AE55; 25 | remoteInfo = CCActivityIndicatorView; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 347C84F31A395B570008AE55 /* CCActivityIndicatorView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CCActivityIndicatorView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 347C84F71A395B570008AE55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 347C84F81A395B570008AE55 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33 | 347C84FA1A395B570008AE55 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 34 | 347C84FD1A395B570008AE55 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 35 | 347C84FF1A395B570008AE55 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 36 | 347C85021A395B570008AE55 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 37 | 347C85081A395B570008AE55 /* CCActivityIndicatorViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CCActivityIndicatorViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 347C850D1A395B570008AE55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 347C850E1A395B570008AE55 /* CCActivityIndicatorViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CCActivityIndicatorViewTests.swift; sourceTree = ""; }; 40 | 347C85191A395B7F0008AE55 /* CCActivityIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCActivityIndicatorView.swift; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 347C84F01A395B570008AE55 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | 347C85051A395B570008AE55 /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 347C84EA1A395B570008AE55 = { 62 | isa = PBXGroup; 63 | children = ( 64 | 347C84F51A395B570008AE55 /* CCActivityIndicatorView */, 65 | 347C850B1A395B570008AE55 /* CCActivityIndicatorViewTests */, 66 | 347C84F41A395B570008AE55 /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | 347C84F41A395B570008AE55 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 347C84F31A395B570008AE55 /* CCActivityIndicatorView.app */, 74 | 347C85081A395B570008AE55 /* CCActivityIndicatorViewTests.xctest */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 347C84F51A395B570008AE55 /* CCActivityIndicatorView */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 347C85191A395B7F0008AE55 /* CCActivityIndicatorView.swift */, 83 | 347C84F81A395B570008AE55 /* AppDelegate.swift */, 84 | 347C84FA1A395B570008AE55 /* ViewController.swift */, 85 | 347C84FC1A395B570008AE55 /* Main.storyboard */, 86 | 347C84FF1A395B570008AE55 /* Images.xcassets */, 87 | 347C85011A395B570008AE55 /* LaunchScreen.xib */, 88 | 347C84F61A395B570008AE55 /* Supporting Files */, 89 | ); 90 | path = CCActivityIndicatorView; 91 | sourceTree = ""; 92 | }; 93 | 347C84F61A395B570008AE55 /* Supporting Files */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 347C84F71A395B570008AE55 /* Info.plist */, 97 | ); 98 | name = "Supporting Files"; 99 | sourceTree = ""; 100 | }; 101 | 347C850B1A395B570008AE55 /* CCActivityIndicatorViewTests */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 347C850E1A395B570008AE55 /* CCActivityIndicatorViewTests.swift */, 105 | 347C850C1A395B570008AE55 /* Supporting Files */, 106 | ); 107 | path = CCActivityIndicatorViewTests; 108 | sourceTree = ""; 109 | }; 110 | 347C850C1A395B570008AE55 /* Supporting Files */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 347C850D1A395B570008AE55 /* Info.plist */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | 347C84F21A395B570008AE55 /* CCActivityIndicatorView */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = 347C85121A395B570008AE55 /* Build configuration list for PBXNativeTarget "CCActivityIndicatorView" */; 124 | buildPhases = ( 125 | 347C84EF1A395B570008AE55 /* Sources */, 126 | 347C84F01A395B570008AE55 /* Frameworks */, 127 | 347C84F11A395B570008AE55 /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = CCActivityIndicatorView; 134 | productName = CCActivityIndicatorView; 135 | productReference = 347C84F31A395B570008AE55 /* CCActivityIndicatorView.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | 347C85071A395B570008AE55 /* CCActivityIndicatorViewTests */ = { 139 | isa = PBXNativeTarget; 140 | buildConfigurationList = 347C85151A395B570008AE55 /* Build configuration list for PBXNativeTarget "CCActivityIndicatorViewTests" */; 141 | buildPhases = ( 142 | 347C85041A395B570008AE55 /* Sources */, 143 | 347C85051A395B570008AE55 /* Frameworks */, 144 | 347C85061A395B570008AE55 /* Resources */, 145 | ); 146 | buildRules = ( 147 | ); 148 | dependencies = ( 149 | 347C850A1A395B570008AE55 /* PBXTargetDependency */, 150 | ); 151 | name = CCActivityIndicatorViewTests; 152 | productName = CCActivityIndicatorViewTests; 153 | productReference = 347C85081A395B570008AE55 /* CCActivityIndicatorViewTests.xctest */; 154 | productType = "com.apple.product-type.bundle.unit-test"; 155 | }; 156 | /* End PBXNativeTarget section */ 157 | 158 | /* Begin PBXProject section */ 159 | 347C84EB1A395B570008AE55 /* Project object */ = { 160 | isa = PBXProject; 161 | attributes = { 162 | LastUpgradeCheck = 0610; 163 | ORGANIZATIONNAME = "Chun Tips"; 164 | TargetAttributes = { 165 | 347C84F21A395B570008AE55 = { 166 | CreatedOnToolsVersion = 6.1.1; 167 | }; 168 | 347C85071A395B570008AE55 = { 169 | CreatedOnToolsVersion = 6.1.1; 170 | TestTargetID = 347C84F21A395B570008AE55; 171 | }; 172 | }; 173 | }; 174 | buildConfigurationList = 347C84EE1A395B570008AE55 /* Build configuration list for PBXProject "CCActivityIndicatorView" */; 175 | compatibilityVersion = "Xcode 3.2"; 176 | developmentRegion = English; 177 | hasScannedForEncodings = 0; 178 | knownRegions = ( 179 | en, 180 | Base, 181 | ); 182 | mainGroup = 347C84EA1A395B570008AE55; 183 | productRefGroup = 347C84F41A395B570008AE55 /* Products */; 184 | projectDirPath = ""; 185 | projectRoot = ""; 186 | targets = ( 187 | 347C84F21A395B570008AE55 /* CCActivityIndicatorView */, 188 | 347C85071A395B570008AE55 /* CCActivityIndicatorViewTests */, 189 | ); 190 | }; 191 | /* End PBXProject section */ 192 | 193 | /* Begin PBXResourcesBuildPhase section */ 194 | 347C84F11A395B570008AE55 /* Resources */ = { 195 | isa = PBXResourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | 347C84FE1A395B570008AE55 /* Main.storyboard in Resources */, 199 | 347C85031A395B570008AE55 /* LaunchScreen.xib in Resources */, 200 | 347C85001A395B570008AE55 /* Images.xcassets in Resources */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | 347C85061A395B570008AE55 /* Resources */ = { 205 | isa = PBXResourcesBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | }; 211 | /* End PBXResourcesBuildPhase section */ 212 | 213 | /* Begin PBXSourcesBuildPhase section */ 214 | 347C84EF1A395B570008AE55 /* Sources */ = { 215 | isa = PBXSourcesBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | 347C851A1A395B7F0008AE55 /* CCActivityIndicatorView.swift in Sources */, 219 | 347C84FB1A395B570008AE55 /* ViewController.swift in Sources */, 220 | 347C84F91A395B570008AE55 /* AppDelegate.swift in Sources */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | 347C85041A395B570008AE55 /* Sources */ = { 225 | isa = PBXSourcesBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | 347C850F1A395B570008AE55 /* CCActivityIndicatorViewTests.swift in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXTargetDependency section */ 235 | 347C850A1A395B570008AE55 /* PBXTargetDependency */ = { 236 | isa = PBXTargetDependency; 237 | target = 347C84F21A395B570008AE55 /* CCActivityIndicatorView */; 238 | targetProxy = 347C85091A395B570008AE55 /* PBXContainerItemProxy */; 239 | }; 240 | /* End PBXTargetDependency section */ 241 | 242 | /* Begin PBXVariantGroup section */ 243 | 347C84FC1A395B570008AE55 /* Main.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 347C84FD1A395B570008AE55 /* Base */, 247 | ); 248 | name = Main.storyboard; 249 | sourceTree = ""; 250 | }; 251 | 347C85011A395B570008AE55 /* LaunchScreen.xib */ = { 252 | isa = PBXVariantGroup; 253 | children = ( 254 | 347C85021A395B570008AE55 /* Base */, 255 | ); 256 | name = LaunchScreen.xib; 257 | sourceTree = ""; 258 | }; 259 | /* End PBXVariantGroup section */ 260 | 261 | /* Begin XCBuildConfiguration section */ 262 | 347C85101A395B570008AE55 /* Debug */ = { 263 | isa = XCBuildConfiguration; 264 | buildSettings = { 265 | ALWAYS_SEARCH_USER_PATHS = NO; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BOOL_CONVERSION = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 273 | CLANG_WARN_EMPTY_BODY = YES; 274 | CLANG_WARN_ENUM_CONVERSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 277 | CLANG_WARN_UNREACHABLE_CODE = YES; 278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 279 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 280 | COPY_PHASE_STRIP = NO; 281 | ENABLE_STRICT_OBJC_MSGSEND = YES; 282 | GCC_C_LANGUAGE_STANDARD = gnu99; 283 | GCC_DYNAMIC_NO_PIC = NO; 284 | GCC_OPTIMIZATION_LEVEL = 0; 285 | GCC_PREPROCESSOR_DEFINITIONS = ( 286 | "DEBUG=1", 287 | "$(inherited)", 288 | ); 289 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 297 | MTL_ENABLE_DEBUG_INFO = YES; 298 | ONLY_ACTIVE_ARCH = YES; 299 | SDKROOT = iphoneos; 300 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 301 | }; 302 | name = Debug; 303 | }; 304 | 347C85111A395B570008AE55 /* Release */ = { 305 | isa = XCBuildConfiguration; 306 | buildSettings = { 307 | ALWAYS_SEARCH_USER_PATHS = NO; 308 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 309 | CLANG_CXX_LIBRARY = "libc++"; 310 | CLANG_ENABLE_MODULES = YES; 311 | CLANG_ENABLE_OBJC_ARC = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 315 | CLANG_WARN_EMPTY_BODY = YES; 316 | CLANG_WARN_ENUM_CONVERSION = YES; 317 | CLANG_WARN_INT_CONVERSION = YES; 318 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 319 | CLANG_WARN_UNREACHABLE_CODE = YES; 320 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 321 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 322 | COPY_PHASE_STRIP = YES; 323 | ENABLE_NS_ASSERTIONS = NO; 324 | ENABLE_STRICT_OBJC_MSGSEND = YES; 325 | GCC_C_LANGUAGE_STANDARD = gnu99; 326 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 327 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 328 | GCC_WARN_UNDECLARED_SELECTOR = YES; 329 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 330 | GCC_WARN_UNUSED_FUNCTION = YES; 331 | GCC_WARN_UNUSED_VARIABLE = YES; 332 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 333 | MTL_ENABLE_DEBUG_INFO = NO; 334 | SDKROOT = iphoneos; 335 | VALIDATE_PRODUCT = YES; 336 | }; 337 | name = Release; 338 | }; 339 | 347C85131A395B570008AE55 /* Debug */ = { 340 | isa = XCBuildConfiguration; 341 | buildSettings = { 342 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 343 | INFOPLIST_FILE = CCActivityIndicatorView/Info.plist; 344 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 345 | PRODUCT_NAME = "$(TARGET_NAME)"; 346 | }; 347 | name = Debug; 348 | }; 349 | 347C85141A395B570008AE55 /* Release */ = { 350 | isa = XCBuildConfiguration; 351 | buildSettings = { 352 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 353 | INFOPLIST_FILE = CCActivityIndicatorView/Info.plist; 354 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 355 | PRODUCT_NAME = "$(TARGET_NAME)"; 356 | }; 357 | name = Release; 358 | }; 359 | 347C85161A395B570008AE55 /* Debug */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | BUNDLE_LOADER = "$(TEST_HOST)"; 363 | FRAMEWORK_SEARCH_PATHS = ( 364 | "$(SDKROOT)/Developer/Library/Frameworks", 365 | "$(inherited)", 366 | ); 367 | GCC_PREPROCESSOR_DEFINITIONS = ( 368 | "DEBUG=1", 369 | "$(inherited)", 370 | ); 371 | INFOPLIST_FILE = CCActivityIndicatorViewTests/Info.plist; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CCActivityIndicatorView.app/CCActivityIndicatorView"; 375 | }; 376 | name = Debug; 377 | }; 378 | 347C85171A395B570008AE55 /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | BUNDLE_LOADER = "$(TEST_HOST)"; 382 | FRAMEWORK_SEARCH_PATHS = ( 383 | "$(SDKROOT)/Developer/Library/Frameworks", 384 | "$(inherited)", 385 | ); 386 | INFOPLIST_FILE = CCActivityIndicatorViewTests/Info.plist; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CCActivityIndicatorView.app/CCActivityIndicatorView"; 390 | }; 391 | name = Release; 392 | }; 393 | /* End XCBuildConfiguration section */ 394 | 395 | /* Begin XCConfigurationList section */ 396 | 347C84EE1A395B570008AE55 /* Build configuration list for PBXProject "CCActivityIndicatorView" */ = { 397 | isa = XCConfigurationList; 398 | buildConfigurations = ( 399 | 347C85101A395B570008AE55 /* Debug */, 400 | 347C85111A395B570008AE55 /* Release */, 401 | ); 402 | defaultConfigurationIsVisible = 0; 403 | defaultConfigurationName = Release; 404 | }; 405 | 347C85121A395B570008AE55 /* Build configuration list for PBXNativeTarget "CCActivityIndicatorView" */ = { 406 | isa = XCConfigurationList; 407 | buildConfigurations = ( 408 | 347C85131A395B570008AE55 /* Debug */, 409 | 347C85141A395B570008AE55 /* Release */, 410 | ); 411 | defaultConfigurationIsVisible = 0; 412 | }; 413 | 347C85151A395B570008AE55 /* Build configuration list for PBXNativeTarget "CCActivityIndicatorViewTests" */ = { 414 | isa = XCConfigurationList; 415 | buildConfigurations = ( 416 | 347C85161A395B570008AE55 /* Debug */, 417 | 347C85171A395B570008AE55 /* Release */, 418 | ); 419 | defaultConfigurationIsVisible = 0; 420 | }; 421 | /* End XCConfigurationList section */ 422 | }; 423 | rootObject = 347C84EB1A395B570008AE55 /* Project object */; 424 | } 425 | -------------------------------------------------------------------------------- /CCActivityIndicatorView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CCActivityIndicatorView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CCLoadingView.swift 3 | // CCLoading 4 | // 5 | // Created by Chun Ye (chunforios@gmail.com)on 12/10/14. 6 | // Github: https://github.com/yechunjun/CCActivityIndicatorView 7 | // Blog: http://chun.tips 8 | // Copyright (c) 2014 Chun Tips. All rights reserved. 9 | // 10 | 11 | import UIKit 12 | 13 | @UIApplicationMain 14 | class AppDelegate: UIResponder, UIApplicationDelegate { 15 | 16 | var window: UIWindow? 17 | 18 | 19 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 20 | // Override point for customization after application launch. 21 | return true 22 | } 23 | 24 | func applicationWillResignActive(application: UIApplication) { 25 | // 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. 26 | // 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. 27 | } 28 | 29 | func applicationDidEnterBackground(application: UIApplication) { 30 | // 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. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | func applicationWillEnterForeground(application: UIApplication) { 35 | // 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. 36 | } 37 | 38 | func applicationDidBecomeActive(application: UIApplication) { 39 | // 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. 40 | } 41 | 42 | func applicationWillTerminate(application: UIApplication) { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /CCActivityIndicatorView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /CCActivityIndicatorView/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 | -------------------------------------------------------------------------------- /CCActivityIndicatorView/CCActivityIndicatorView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CCLoadingView.swift 3 | // CCLoading 4 | // 5 | // Created by Chun Ye on 12/10/14. 6 | // Copyright (c) 2014 Chun Tips. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | 12 | struct Config { 13 | 14 | static let CC_ACTIVITY_INDICATOR_VIEW_NUMBEROFFRAMES: Int = 8 15 | static let CC_ACTIVITY_INDICATOR_VIEW_WIDTH: CGFloat = 40 16 | static let CC_ARC_DRAW_PADDING: CGFloat = 3.0 17 | static let CC_ARC_DRAW_DEGREE: CGFloat = 39.0 18 | static let CC_ARC_DRAW_WIDTH: CGFloat = 6.0 19 | static let CC_ARC_DRAW_RADIUS: CGFloat = 10.0 20 | static let CC_ARC_DRAW_COLORS = [UIColor(red: 242/255.0, green: 242/255.0, blue: 242/255.0, alpha: 1.0).CGColor, UIColor(red: 230/255.0, green: 230/255.0, blue: 230/255.0, alpha: 1.0).CGColor, UIColor(red: 179/255.0, green: 179/255.0, blue: 179/255.0, alpha: 1.0).CGColor, UIColor(red: 128/255.0, green: 128/255.0, blue: 128/255.0, alpha: 1.0).CGColor, UIColor(red: 128/255.0, green: 128/255.0, blue: 128/255.0, alpha: 1.0).CGColor, UIColor(red: 128/255.0, green: 128/255.0, blue: 128/255.0, alpha: 1.0).CGColor, UIColor(red: 128/255.0, green: 128/255.0, blue: 128/255.0, alpha: 1.0).CGColor, UIColor(red: 128/255.0, green: 128/255.0, blue: 128/255.0, alpha: 1.0).CGColor] 21 | 22 | static func CCActivityIndicatorViewFrameImage(frame: Int, _ scale: CGFloat) -> UIImage { 23 | 24 | UIGraphicsBeginImageContextWithOptions(CGSizeMake(CC_ACTIVITY_INDICATOR_VIEW_WIDTH, CC_ACTIVITY_INDICATOR_VIEW_WIDTH), false, scale) 25 | 26 | let context = UIGraphicsGetCurrentContext() 27 | 28 | var startDegree = Config.CC_ARC_DRAW_PADDING 29 | for index in 1...8 { 30 | let arcPath = UIBezierPath() 31 | let center = CGPointMake(Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH / 2, Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH / 2) 32 | let startAngle = CGFloat(DegreesToRadians(Double(startDegree))) 33 | let endAngle = CGFloat(DegreesToRadians(Double(startDegree + Config.CC_ARC_DRAW_DEGREE))) 34 | arcPath.addArcWithCenter(center, radius: Config.CC_ARC_DRAW_RADIUS, startAngle: startAngle, endAngle: endAngle, clockwise: true) 35 | CGContextAddPath(context, arcPath.CGPath) 36 | startDegree += Config.CC_ARC_DRAW_DEGREE + (Config.CC_ARC_DRAW_PADDING * 2) 37 | CGContextSetLineWidth(context, Config.CC_ARC_DRAW_WIDTH) 38 | let colorIndex = abs(index - frame) 39 | let strokeColor = Config.CC_ARC_DRAW_COLORS[colorIndex] 40 | CGContextSetStrokeColorWithColor(context, strokeColor) 41 | CGContextStrokePath(context) 42 | } 43 | 44 | let image = UIGraphicsGetImageFromCurrentImageContext() 45 | UIGraphicsEndImageContext() 46 | 47 | return image 48 | } 49 | } 50 | 51 | // MARK: Helpers 52 | 53 | func DegreesToRadians (value: Double) -> Double { 54 | return value * M_PI / 180.0 55 | } 56 | 57 | // MARK: Activity Indicator View 58 | 59 | @IBDesignable class CCActivityIndicatorView: UIView { 60 | 61 | @IBInspectable var hidesWhenStopped : Bool = true { 62 | didSet { 63 | if self.hidesWhenStopped { 64 | self.hidden = !self.animating 65 | } else { 66 | self.hidden = false 67 | } 68 | } 69 | } 70 | 71 | func startAnimating () { 72 | 73 | func animate () { 74 | self.animating = true 75 | self.hidden = false 76 | let animationDuration: CFTimeInterval = 0.8 77 | var animationImages = [CGImageRef]() 78 | 79 | for frame in 1...Config.CC_ACTIVITY_INDICATOR_VIEW_NUMBEROFFRAMES { 80 | animationImages.append(Config.CCActivityIndicatorViewFrameImage(frame, UIScreen.mainScreen().nativeScale).CGImage) 81 | } 82 | 83 | let animation = CAKeyframeAnimation(keyPath: "contents") 84 | animation.calculationMode = kCAAnimationDiscrete 85 | animation.duration = animationDuration 86 | animation.repeatCount = HUGE 87 | animation.values = animationImages 88 | animation.removedOnCompletion = false 89 | animation.fillMode = kCAFillModeBoth 90 | self.layer.addAnimation(animation, forKey: "contents") 91 | } 92 | 93 | if !self.animating { 94 | animate() 95 | } 96 | } 97 | 98 | func stopAnimating () { 99 | self.animating = false 100 | 101 | self.layer.removeAnimationForKey("contents") 102 | self.layer.contents = Config.CCActivityIndicatorViewFrameImage(0, UIScreen.mainScreen().nativeScale).CGImage 103 | 104 | if self.hidesWhenStopped { 105 | self.hidden = true 106 | } 107 | } 108 | 109 | func isAnimating () -> Bool { 110 | return self.animating 111 | } 112 | 113 | // MARK: Init & Deinit 114 | 115 | override convenience init() { 116 | self.init(frame: CGRectZero) 117 | } 118 | 119 | override init(frame: CGRect) { 120 | super.init(frame: CGRectZero) 121 | self.backgroundColor = UIColor.clearColor() 122 | self.startAnimating() 123 | } 124 | 125 | required init(coder aDecoder: NSCoder) { 126 | super.init(coder: aDecoder) 127 | self.startAnimating() 128 | } 129 | 130 | // MARK: Private 131 | 132 | private var animating = false 133 | 134 | override func intrinsicContentSize() -> CGSize { 135 | return CGSizeMake(Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH, Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH) 136 | } 137 | 138 | override func sizeThatFits(size: CGSize) -> CGSize { 139 | return CGSizeMake(Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH, Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH) 140 | } 141 | 142 | override func layoutSubviews() { 143 | super.layoutSubviews() 144 | 145 | if self.layer.bounds.size.width != Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH { 146 | self.layer.bounds = CGRectMake(0, 0, Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH, Config.CC_ACTIVITY_INDICATOR_VIEW_WIDTH) 147 | } 148 | } 149 | } -------------------------------------------------------------------------------- /CCActivityIndicatorView/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" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /CCActivityIndicatorView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | tips.chun.$(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 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /CCActivityIndicatorView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CCLoadingView.swift 3 | // CCLoading 4 | // 5 | // Created by Chun Ye (chunforios@gmail.com)on 12/10/14. 6 | // Github: https://github.com/yechunjun/CCActivityIndicatorView 7 | // Blog: http://chun.tips 8 | // Copyright (c) 2014 Chun Tips. All rights reserved. 9 | // 10 | 11 | import UIKit 12 | 13 | class ViewController: UIViewController { 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | // Do any additional setup after loading the view, typically from a nib. 18 | } 19 | 20 | override func didReceiveMemoryWarning() { 21 | super.didReceiveMemoryWarning() 22 | // Dispose of any resources that can be recreated. 23 | } 24 | 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /CCActivityIndicatorViewTests/CCActivityIndicatorViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CCActivityIndicatorViewTests.swift 3 | // CCActivityIndicatorViewTests 4 | // 5 | // Created by Chun Ye on 12/11/14. 6 | // Copyright (c) 2014 Chun Tips. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class CCActivityIndicatorViewTests: 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 | -------------------------------------------------------------------------------- /CCActivityIndicatorViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | tips.chun.$(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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CCActivityIndicatorView 2 | ======================= 3 | 4 | This is a custom activityIndicator view. Provide the same features like UIActivityIndicatorView. 5 | 6 | 7 | 8 | 9 | 10 | --- 11 | 12 | 13 | 对应博文地址如下: [使用 Swift 构建自定义的ActivityIndicator View](http://chun.tips/blog/2014/12/11/shi-yong-swift-gou-jian-zi-ding-yi-de-activityindicator-view/) 14 | --------------------------------------------------------------------------------