├── Loader.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── phillipcaudell.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── phillipcaudell.xcuserdatad │ └── xcschemes │ ├── Loader.xcscheme │ └── xcschememanagement.plist ├── Loader ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── Loader-Info.plist ├── Loader-Prefix.pch ├── PCAppDelegate.h ├── PCAppDelegate.m ├── PCViewController.h ├── PCViewController.m ├── en.lproj │ └── InfoPlist.strings └── main.m ├── PCAngularActivityIndicatorView.h ├── PCAngularActivityIndicatorView.m ├── Preview.gif └── README.md /Loader.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1300BCEC199BF1630094CE6B /* PCAngularActivityIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1300BCEB199BF1630094CE6B /* PCAngularActivityIndicatorView.m */; }; 11 | 137ED1E3199B87CD00C34DEE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 137ED1E2199B87CD00C34DEE /* Foundation.framework */; }; 12 | 137ED1E5199B87CD00C34DEE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 137ED1E4199B87CD00C34DEE /* CoreGraphics.framework */; }; 13 | 137ED1E7199B87CD00C34DEE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 137ED1E6199B87CD00C34DEE /* UIKit.framework */; }; 14 | 137ED1ED199B87CD00C34DEE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 137ED1EB199B87CD00C34DEE /* InfoPlist.strings */; }; 15 | 137ED1EF199B87CD00C34DEE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 137ED1EE199B87CD00C34DEE /* main.m */; }; 16 | 137ED1F3199B87CD00C34DEE /* PCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 137ED1F2199B87CD00C34DEE /* PCAppDelegate.m */; }; 17 | 137ED1FC199B87CD00C34DEE /* PCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 137ED1FB199B87CD00C34DEE /* PCViewController.m */; }; 18 | 137ED1FE199B87CD00C34DEE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 137ED1FD199B87CD00C34DEE /* Images.xcassets */; }; 19 | 137ED205199B87CD00C34DEE /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 137ED204199B87CD00C34DEE /* XCTest.framework */; }; 20 | 137ED206199B87CD00C34DEE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 137ED1E2199B87CD00C34DEE /* Foundation.framework */; }; 21 | 137ED207199B87CD00C34DEE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 137ED1E6199B87CD00C34DEE /* UIKit.framework */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 137ED208199B87CD00C34DEE /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 137ED1D7199B87CD00C34DEE /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 137ED1DE199B87CD00C34DEE; 30 | remoteInfo = Loader; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 1300BCEA199BF1630094CE6B /* PCAngularActivityIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PCAngularActivityIndicatorView.h; sourceTree = SOURCE_ROOT; }; 36 | 1300BCEB199BF1630094CE6B /* PCAngularActivityIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PCAngularActivityIndicatorView.m; sourceTree = SOURCE_ROOT; }; 37 | 137ED1DF199B87CD00C34DEE /* Loader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Loader.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 137ED1E2199B87CD00C34DEE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 39 | 137ED1E4199B87CD00C34DEE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 40 | 137ED1E6199B87CD00C34DEE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 41 | 137ED1EA199B87CD00C34DEE /* Loader-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Loader-Info.plist"; sourceTree = ""; }; 42 | 137ED1EC199B87CD00C34DEE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 43 | 137ED1EE199B87CD00C34DEE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 44 | 137ED1F0199B87CD00C34DEE /* Loader-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Loader-Prefix.pch"; sourceTree = ""; }; 45 | 137ED1F1199B87CD00C34DEE /* PCAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PCAppDelegate.h; sourceTree = ""; }; 46 | 137ED1F2199B87CD00C34DEE /* PCAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PCAppDelegate.m; sourceTree = ""; }; 47 | 137ED1FA199B87CD00C34DEE /* PCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PCViewController.h; sourceTree = ""; }; 48 | 137ED1FB199B87CD00C34DEE /* PCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PCViewController.m; sourceTree = ""; }; 49 | 137ED1FD199B87CD00C34DEE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 50 | 137ED203199B87CD00C34DEE /* LoaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LoaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 137ED204199B87CD00C34DEE /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 137ED1DC199B87CD00C34DEE /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 137ED1E5199B87CD00C34DEE /* CoreGraphics.framework in Frameworks */, 60 | 137ED1E7199B87CD00C34DEE /* UIKit.framework in Frameworks */, 61 | 137ED1E3199B87CD00C34DEE /* Foundation.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | 137ED200199B87CD00C34DEE /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 137ED205199B87CD00C34DEE /* XCTest.framework in Frameworks */, 70 | 137ED207199B87CD00C34DEE /* UIKit.framework in Frameworks */, 71 | 137ED206199B87CD00C34DEE /* Foundation.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 137ED1D6199B87CD00C34DEE = { 79 | isa = PBXGroup; 80 | children = ( 81 | 137ED1E8199B87CD00C34DEE /* Loader */, 82 | 137ED1E1199B87CD00C34DEE /* Frameworks */, 83 | 137ED1E0199B87CD00C34DEE /* Products */, 84 | ); 85 | sourceTree = ""; 86 | }; 87 | 137ED1E0199B87CD00C34DEE /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 137ED1DF199B87CD00C34DEE /* Loader.app */, 91 | 137ED203199B87CD00C34DEE /* LoaderTests.xctest */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | 137ED1E1199B87CD00C34DEE /* Frameworks */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 137ED1E2199B87CD00C34DEE /* Foundation.framework */, 100 | 137ED1E4199B87CD00C34DEE /* CoreGraphics.framework */, 101 | 137ED1E6199B87CD00C34DEE /* UIKit.framework */, 102 | 137ED204199B87CD00C34DEE /* XCTest.framework */, 103 | ); 104 | name = Frameworks; 105 | sourceTree = ""; 106 | }; 107 | 137ED1E8199B87CD00C34DEE /* Loader */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 137ED1F1199B87CD00C34DEE /* PCAppDelegate.h */, 111 | 137ED1F2199B87CD00C34DEE /* PCAppDelegate.m */, 112 | 137ED1FA199B87CD00C34DEE /* PCViewController.h */, 113 | 137ED1FB199B87CD00C34DEE /* PCViewController.m */, 114 | 1300BCEA199BF1630094CE6B /* PCAngularActivityIndicatorView.h */, 115 | 1300BCEB199BF1630094CE6B /* PCAngularActivityIndicatorView.m */, 116 | 137ED1FD199B87CD00C34DEE /* Images.xcassets */, 117 | 137ED1E9199B87CD00C34DEE /* Supporting Files */, 118 | ); 119 | path = Loader; 120 | sourceTree = ""; 121 | }; 122 | 137ED1E9199B87CD00C34DEE /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 137ED1EA199B87CD00C34DEE /* Loader-Info.plist */, 126 | 137ED1EB199B87CD00C34DEE /* InfoPlist.strings */, 127 | 137ED1EE199B87CD00C34DEE /* main.m */, 128 | 137ED1F0199B87CD00C34DEE /* Loader-Prefix.pch */, 129 | ); 130 | name = "Supporting Files"; 131 | sourceTree = ""; 132 | }; 133 | /* End PBXGroup section */ 134 | 135 | /* Begin PBXNativeTarget section */ 136 | 137ED1DE199B87CD00C34DEE /* Loader */ = { 137 | isa = PBXNativeTarget; 138 | buildConfigurationList = 137ED214199B87CD00C34DEE /* Build configuration list for PBXNativeTarget "Loader" */; 139 | buildPhases = ( 140 | 137ED1DB199B87CD00C34DEE /* Sources */, 141 | 137ED1DC199B87CD00C34DEE /* Frameworks */, 142 | 137ED1DD199B87CD00C34DEE /* Resources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Loader; 149 | productName = Loader; 150 | productReference = 137ED1DF199B87CD00C34DEE /* Loader.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | 137ED202199B87CD00C34DEE /* LoaderTests */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 137ED217199B87CD00C34DEE /* Build configuration list for PBXNativeTarget "LoaderTests" */; 156 | buildPhases = ( 157 | 137ED1FF199B87CD00C34DEE /* Sources */, 158 | 137ED200199B87CD00C34DEE /* Frameworks */, 159 | 137ED201199B87CD00C34DEE /* Resources */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | 137ED209199B87CD00C34DEE /* PBXTargetDependency */, 165 | ); 166 | name = LoaderTests; 167 | productName = LoaderTests; 168 | productReference = 137ED203199B87CD00C34DEE /* LoaderTests.xctest */; 169 | productType = "com.apple.product-type.bundle.unit-test"; 170 | }; 171 | /* End PBXNativeTarget section */ 172 | 173 | /* Begin PBXProject section */ 174 | 137ED1D7199B87CD00C34DEE /* Project object */ = { 175 | isa = PBXProject; 176 | attributes = { 177 | CLASSPREFIX = TSC; 178 | LastUpgradeCheck = 0510; 179 | ORGANIZATIONNAME = "3 SIDED CUBE APP PRODUCTIONS LTD"; 180 | TargetAttributes = { 181 | 137ED202199B87CD00C34DEE = { 182 | TestTargetID = 137ED1DE199B87CD00C34DEE; 183 | }; 184 | }; 185 | }; 186 | buildConfigurationList = 137ED1DA199B87CD00C34DEE /* Build configuration list for PBXProject "Loader" */; 187 | compatibilityVersion = "Xcode 3.2"; 188 | developmentRegion = English; 189 | hasScannedForEncodings = 0; 190 | knownRegions = ( 191 | en, 192 | Base, 193 | ); 194 | mainGroup = 137ED1D6199B87CD00C34DEE; 195 | productRefGroup = 137ED1E0199B87CD00C34DEE /* Products */; 196 | projectDirPath = ""; 197 | projectRoot = ""; 198 | targets = ( 199 | 137ED1DE199B87CD00C34DEE /* Loader */, 200 | 137ED202199B87CD00C34DEE /* LoaderTests */, 201 | ); 202 | }; 203 | /* End PBXProject section */ 204 | 205 | /* Begin PBXResourcesBuildPhase section */ 206 | 137ED1DD199B87CD00C34DEE /* Resources */ = { 207 | isa = PBXResourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | 137ED1FE199B87CD00C34DEE /* Images.xcassets in Resources */, 211 | 137ED1ED199B87CD00C34DEE /* InfoPlist.strings in Resources */, 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | 137ED201199B87CD00C34DEE /* Resources */ = { 216 | isa = PBXResourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | /* End PBXResourcesBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 137ED1DB199B87CD00C34DEE /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 137ED1FC199B87CD00C34DEE /* PCViewController.m in Sources */, 230 | 137ED1EF199B87CD00C34DEE /* main.m in Sources */, 231 | 1300BCEC199BF1630094CE6B /* PCAngularActivityIndicatorView.m in Sources */, 232 | 137ED1F3199B87CD00C34DEE /* PCAppDelegate.m in Sources */, 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | 137ED1FF199B87CD00C34DEE /* Sources */ = { 237 | isa = PBXSourcesBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | }; 243 | /* End PBXSourcesBuildPhase section */ 244 | 245 | /* Begin PBXTargetDependency section */ 246 | 137ED209199B87CD00C34DEE /* PBXTargetDependency */ = { 247 | isa = PBXTargetDependency; 248 | target = 137ED1DE199B87CD00C34DEE /* Loader */; 249 | targetProxy = 137ED208199B87CD00C34DEE /* PBXContainerItemProxy */; 250 | }; 251 | /* End PBXTargetDependency section */ 252 | 253 | /* Begin PBXVariantGroup section */ 254 | 137ED1EB199B87CD00C34DEE /* InfoPlist.strings */ = { 255 | isa = PBXVariantGroup; 256 | children = ( 257 | 137ED1EC199B87CD00C34DEE /* en */, 258 | ); 259 | name = InfoPlist.strings; 260 | sourceTree = ""; 261 | }; 262 | /* End PBXVariantGroup section */ 263 | 264 | /* Begin XCBuildConfiguration section */ 265 | 137ED212199B87CD00C34DEE /* Debug */ = { 266 | isa = XCBuildConfiguration; 267 | buildSettings = { 268 | ALWAYS_SEARCH_USER_PATHS = NO; 269 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 270 | CLANG_CXX_LIBRARY = "libc++"; 271 | CLANG_ENABLE_MODULES = YES; 272 | CLANG_ENABLE_OBJC_ARC = YES; 273 | CLANG_WARN_BOOL_CONVERSION = YES; 274 | CLANG_WARN_CONSTANT_CONVERSION = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_EMPTY_BODY = YES; 277 | CLANG_WARN_ENUM_CONVERSION = YES; 278 | CLANG_WARN_INT_CONVERSION = YES; 279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 280 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 281 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 282 | COPY_PHASE_STRIP = NO; 283 | GCC_C_LANGUAGE_STANDARD = gnu99; 284 | GCC_DYNAMIC_NO_PIC = NO; 285 | GCC_OPTIMIZATION_LEVEL = 0; 286 | GCC_PREPROCESSOR_DEFINITIONS = ( 287 | "DEBUG=1", 288 | "$(inherited)", 289 | ); 290 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 291 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 292 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 293 | GCC_WARN_UNDECLARED_SELECTOR = YES; 294 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 295 | GCC_WARN_UNUSED_FUNCTION = YES; 296 | GCC_WARN_UNUSED_VARIABLE = YES; 297 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 298 | ONLY_ACTIVE_ARCH = YES; 299 | SDKROOT = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | }; 302 | name = Debug; 303 | }; 304 | 137ED213199B87CD00C34DEE /* 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__DUPLICATE_METHOD_MATCH = YES; 320 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 321 | COPY_PHASE_STRIP = YES; 322 | ENABLE_NS_ASSERTIONS = NO; 323 | GCC_C_LANGUAGE_STANDARD = gnu99; 324 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 325 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 326 | GCC_WARN_UNDECLARED_SELECTOR = YES; 327 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 328 | GCC_WARN_UNUSED_FUNCTION = YES; 329 | GCC_WARN_UNUSED_VARIABLE = YES; 330 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 331 | SDKROOT = iphoneos; 332 | TARGETED_DEVICE_FAMILY = "1,2"; 333 | VALIDATE_PRODUCT = YES; 334 | }; 335 | name = Release; 336 | }; 337 | 137ED215199B87CD00C34DEE /* Debug */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 341 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 342 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 343 | GCC_PREFIX_HEADER = "Loader/Loader-Prefix.pch"; 344 | INFOPLIST_FILE = "Loader/Loader-Info.plist"; 345 | PRODUCT_NAME = "$(TARGET_NAME)"; 346 | WRAPPER_EXTENSION = app; 347 | }; 348 | name = Debug; 349 | }; 350 | 137ED216199B87CD00C34DEE /* Release */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 354 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 355 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 356 | GCC_PREFIX_HEADER = "Loader/Loader-Prefix.pch"; 357 | INFOPLIST_FILE = "Loader/Loader-Info.plist"; 358 | PRODUCT_NAME = "$(TARGET_NAME)"; 359 | WRAPPER_EXTENSION = app; 360 | }; 361 | name = Release; 362 | }; 363 | 137ED218199B87CD00C34DEE /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Loader.app/Loader"; 367 | FRAMEWORK_SEARCH_PATHS = ( 368 | "$(SDKROOT)/Developer/Library/Frameworks", 369 | "$(inherited)", 370 | "$(DEVELOPER_FRAMEWORKS_DIR)", 371 | ); 372 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 373 | GCC_PREFIX_HEADER = "Loader/Loader-Prefix.pch"; 374 | GCC_PREPROCESSOR_DEFINITIONS = ( 375 | "DEBUG=1", 376 | "$(inherited)", 377 | ); 378 | INFOPLIST_FILE = "LoaderTests/LoaderTests-Info.plist"; 379 | PRODUCT_NAME = "$(TARGET_NAME)"; 380 | TEST_HOST = "$(BUNDLE_LOADER)"; 381 | WRAPPER_EXTENSION = xctest; 382 | }; 383 | name = Debug; 384 | }; 385 | 137ED219199B87CD00C34DEE /* Release */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Loader.app/Loader"; 389 | FRAMEWORK_SEARCH_PATHS = ( 390 | "$(SDKROOT)/Developer/Library/Frameworks", 391 | "$(inherited)", 392 | "$(DEVELOPER_FRAMEWORKS_DIR)", 393 | ); 394 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 395 | GCC_PREFIX_HEADER = "Loader/Loader-Prefix.pch"; 396 | INFOPLIST_FILE = "LoaderTests/LoaderTests-Info.plist"; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | TEST_HOST = "$(BUNDLE_LOADER)"; 399 | WRAPPER_EXTENSION = xctest; 400 | }; 401 | name = Release; 402 | }; 403 | /* End XCBuildConfiguration section */ 404 | 405 | /* Begin XCConfigurationList section */ 406 | 137ED1DA199B87CD00C34DEE /* Build configuration list for PBXProject "Loader" */ = { 407 | isa = XCConfigurationList; 408 | buildConfigurations = ( 409 | 137ED212199B87CD00C34DEE /* Debug */, 410 | 137ED213199B87CD00C34DEE /* Release */, 411 | ); 412 | defaultConfigurationIsVisible = 0; 413 | defaultConfigurationName = Release; 414 | }; 415 | 137ED214199B87CD00C34DEE /* Build configuration list for PBXNativeTarget "Loader" */ = { 416 | isa = XCConfigurationList; 417 | buildConfigurations = ( 418 | 137ED215199B87CD00C34DEE /* Debug */, 419 | 137ED216199B87CD00C34DEE /* Release */, 420 | ); 421 | defaultConfigurationIsVisible = 0; 422 | defaultConfigurationName = Release; 423 | }; 424 | 137ED217199B87CD00C34DEE /* Build configuration list for PBXNativeTarget "LoaderTests" */ = { 425 | isa = XCConfigurationList; 426 | buildConfigurations = ( 427 | 137ED218199B87CD00C34DEE /* Debug */, 428 | 137ED219199B87CD00C34DEE /* Release */, 429 | ); 430 | defaultConfigurationIsVisible = 0; 431 | defaultConfigurationName = Release; 432 | }; 433 | /* End XCConfigurationList section */ 434 | }; 435 | rootObject = 137ED1D7199B87CD00C34DEE /* Project object */; 436 | } 437 | -------------------------------------------------------------------------------- /Loader.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Loader.xcodeproj/project.xcworkspace/xcuserdata/phillipcaudell.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phillipcaudell/PCAngularActivityIndicatorView/6acfadf6edbe1f0b6424b51cc873f8d38ab3331e/Loader.xcodeproj/project.xcworkspace/xcuserdata/phillipcaudell.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Loader.xcodeproj/project.xcworkspace/xcuserdata/phillipcaudell.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Loader.xcodeproj/xcuserdata/phillipcaudell.xcuserdatad/xcschemes/Loader.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Loader.xcodeproj/xcuserdata/phillipcaudell.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Loader.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 137ED1DE199B87CD00C34DEE 16 | 17 | primary 18 | 19 | 20 | 137ED202199B87CD00C34DEE 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Loader/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 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Loader/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 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /Loader/Loader-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Loader 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.phillipcaudell.loader 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Loader/Loader-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Loader/PCAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSCAppDelegate.h 3 | // Loader 4 | // 5 | // Created by Phillip Caudell on 13/08/2014. 6 | // 7 | 8 | #import 9 | 10 | @interface PCAppDelegate : UIResponder 11 | 12 | @property (strong, nonatomic) UIWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Loader/PCAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSCAppDelegate.m 3 | // Loader 4 | // 5 | // Created by Phillip Caudell on 13/08/2014. 6 | // 7 | 8 | #import "PCAppDelegate.h" 9 | #import "PCViewController.h" 10 | 11 | @implementation PCAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 16 | self.window.backgroundColor = [UIColor whiteColor]; 17 | self.window.rootViewController = [PCViewController new]; 18 | 19 | [self.window makeKeyAndVisible]; 20 | 21 | return YES; 22 | } 23 | 24 | @end -------------------------------------------------------------------------------- /Loader/PCViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PCViewController.h 3 | // Loader 4 | // 5 | // Created by Phillip Caudell on 13/08/2014. 6 | // 7 | 8 | #import 9 | #import "PCAngularActivityIndicatorView.h" 10 | 11 | @interface PCViewController : UIViewController 12 | 13 | @property (nonatomic, strong) PCAngularActivityIndicatorView *activityIndicator; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Loader/PCViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PCViewController.m 3 | // Loader 4 | // 5 | // Created by Phillip Caudell on 13/08/2014. 6 | // 7 | 8 | #import "PCViewController.h" 9 | 10 | @interface PCViewController () 11 | 12 | @end 13 | 14 | @implementation PCViewController 15 | 16 | - (void)viewDidLoad 17 | { 18 | [super viewDidLoad]; 19 | 20 | self.activityIndicator = [[PCAngularActivityIndicatorView alloc] initWithActivityIndicatorStyle:PCAngularActivityIndicatorViewStyleLarge]; 21 | self.activityIndicator.color = [UIColor redColor]; 22 | [self.view addSubview:self.activityIndicator]; 23 | } 24 | 25 | - (void)viewWillLayoutSubviews 26 | { 27 | [super viewWillLayoutSubviews]; 28 | 29 | self.activityIndicator.center = self.view.center; 30 | } 31 | 32 | - (void)viewDidAppear:(BOOL)animated 33 | { 34 | [super viewDidAppear:animated]; 35 | 36 | [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(handleStart:) userInfo:nil repeats:NO]; 37 | [NSTimer scheduledTimerWithTimeInterval:7.0 target:self selector:@selector(handleStop:) userInfo:nil repeats:NO]; 38 | } 39 | 40 | - (void)handleStart:(id)sender 41 | { 42 | [self.activityIndicator startAnimating]; 43 | } 44 | 45 | - (void)handleStop:(id)sender 46 | { 47 | [self.activityIndicator stopAnimating]; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Loader/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Loader/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Loader 4 | // 5 | // Created by Phillip Caudell on 13/08/2014. 6 | // Copyright (c) 2014 3 SIDED CUBE APP PRODUCTIONS LTD. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "PCAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([PCAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PCAngularActivityIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PCAngularActivityIndicatorView.h 3 | // 4 | // Copyright (c) 2014 Phillip Caudell phillipcaudell@gmail.com 5 | // 6 | // The MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | typedef NS_ENUM(NSInteger, PCAngularActivityIndicatorViewStyle) { 18 | PCAngularActivityIndicatorViewStyleSmall, 19 | PCAngularActivityIndicatorViewStyleDefault, 20 | PCAngularActivityIndicatorViewStyleLarge 21 | }; 22 | 23 | /** 24 | Use an activity indicator to show that a task is in progress. An activity indicator appears as a “spiral” that is either spinning or stopped. 25 | 26 | You control when an activity indicator animates by calling the startAnimating and stopAnimating methods. To automatically hide the activity indicator when animation stops, set the hidesWhenStopped property to YES. 27 | */ 28 | @interface PCAngularActivityIndicatorView : UIView 29 | 30 | /** 31 | The color of the activity indicator. 32 | */ 33 | @property (nonatomic, strong) UIColor *color; 34 | 35 | /** 36 | Returns whether the receiver is animating. 37 | */ 38 | @property (nonatomic, readonly, getter = isAnimating) BOOL animating; 39 | 40 | /** 41 | The basic appearance of the activity indicator. 42 | */ 43 | @property (nonatomic, assign) PCAngularActivityIndicatorViewStyle activityIndicatorViewStyle; 44 | 45 | /** 46 | A Boolean value that controls whether the receiver is hidden when the animation is stopped. 47 | */ 48 | @property (nonatomic, assign) BOOL hidesWhenStopped; 49 | 50 | /** 51 | Initializes and returns an activity-indicator object. 52 | @param style An enum that specifies the style of the object to be created. 53 | */ 54 | - (id)initWithActivityIndicatorStyle:(PCAngularActivityIndicatorViewStyle)style; 55 | 56 | - (id)initWithCustomSize:(CGSize)size lineWidth:(CGFloat)lineWidth andDuration:(CGFloat)duration; 57 | 58 | /** 59 | Starts the animation of the progress indicator. 60 | */ 61 | - (void)startAnimating; 62 | 63 | /** 64 | Stops the animation of the progress indicator. 65 | */ 66 | - (void)stopAnimating; 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /PCAngularActivityIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PCAngularActivityIndicatorView.m 3 | // 4 | // Copyright (c) 2014 Phillip Caudell phillipcaudell@gmail.com 5 | // 6 | // The MIT License 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "PCAngularActivityIndicatorView.h" 16 | 17 | @interface PCAngularActivityIndicatorView () 18 | 19 | @property (nonatomic, strong) CAShapeLayer *shapeLayer; 20 | @property (nonatomic, strong) UIView *contentView; 21 | @property (nonatomic, assign) CGFloat duration; 22 | 23 | @end 24 | 25 | @implementation PCAngularActivityIndicatorView 26 | 27 | - (id)init 28 | { 29 | return [self initWithActivityIndicatorStyle:PCAngularActivityIndicatorViewStyleDefault]; 30 | } 31 | 32 | - (id)initWithCustomSize:(CGSize)size lineWidth:(CGFloat)lineWidth andDuration:(CGFloat)duration 33 | { 34 | CGRect frame = CGRectMake(0, 0, size.width, size.height); 35 | 36 | if (self = [super initWithFrame:frame]) { 37 | self.contentView = [[UIView alloc] initWithFrame:self.bounds]; 38 | [self addSubview:self.contentView]; 39 | 40 | CGFloat radius = frame.size.width / 2; 41 | 42 | self.shapeLayer = [CAShapeLayer layer]; 43 | self.shapeLayer.frame = self.bounds; 44 | self.shapeLayer.lineWidth = lineWidth; 45 | self.shapeLayer.fillColor = [[UIColor clearColor] CGColor]; 46 | self.shapeLayer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, 2.0 * radius, 2.0 * radius) cornerRadius:radius].CGPath; 47 | self.shapeLayer.lineCap = kCALineJoinRound; 48 | self.shapeLayer.hidden = YES; 49 | [self.contentView.layer insertSublayer:self.shapeLayer atIndex:0]; 50 | 51 | // Defaults 52 | self.hidesWhenStopped = YES; 53 | self.duration = duration; 54 | self.color = [UIColor lightGrayColor]; 55 | } 56 | 57 | return self; 58 | } 59 | 60 | - (id)initWithActivityIndicatorStyle:(PCAngularActivityIndicatorViewStyle)style 61 | { 62 | CGRect frame; 63 | CGFloat lineWidth; 64 | CGFloat duration; 65 | 66 | switch (style) { 67 | case PCAngularActivityIndicatorViewStyleSmall: 68 | frame = CGRectMake(0, 0, 20, 20); 69 | lineWidth = 2.0; 70 | duration = 0.8; 71 | break; 72 | case PCAngularActivityIndicatorViewStyleDefault: 73 | frame = CGRectMake(0, 0, 30, 30); 74 | lineWidth = 4.0; 75 | duration = 0.8; 76 | break; 77 | case PCAngularActivityIndicatorViewStyleLarge: 78 | frame = CGRectMake(0, 0, 60, 60); 79 | lineWidth = 8.0; 80 | duration = 1.0; 81 | break; 82 | default: 83 | break; 84 | } 85 | 86 | if (self = [super initWithFrame:frame]) { 87 | 88 | self.contentView = [[UIView alloc] initWithFrame:self.bounds]; 89 | [self addSubview:self.contentView]; 90 | 91 | CGFloat radius = frame.size.width / 2; 92 | 93 | self.shapeLayer = [CAShapeLayer layer]; 94 | self.shapeLayer.frame = self.bounds; 95 | self.shapeLayer.lineWidth = lineWidth; 96 | self.shapeLayer.fillColor = [[UIColor clearColor] CGColor]; 97 | self.shapeLayer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, 2.0 * radius, 2.0 * radius) cornerRadius:radius].CGPath; 98 | self.shapeLayer.lineCap = kCALineJoinRound; 99 | self.shapeLayer.hidden = YES; 100 | [self.contentView.layer insertSublayer:self.shapeLayer atIndex:0]; 101 | 102 | // Defaults 103 | self.hidesWhenStopped = YES; 104 | self.duration = duration; 105 | self.color = [UIColor lightGrayColor]; 106 | } 107 | 108 | return self; 109 | } 110 | 111 | - (void)startAnimating 112 | { 113 | if (self.isAnimating) { 114 | return; 115 | } 116 | 117 | _animating = YES; 118 | 119 | CAKeyframeAnimation *inAnimation = [CAKeyframeAnimation animationWithKeyPath:@"strokeEnd"]; 120 | inAnimation.duration = self.duration; 121 | inAnimation.values = @[@(0), @(1)]; 122 | 123 | CAKeyframeAnimation *outAnimation = [CAKeyframeAnimation animationWithKeyPath:@"strokeStart"]; 124 | outAnimation.duration = self.duration; 125 | outAnimation.values = @[@(0), @(0.8), @(1)]; 126 | outAnimation.beginTime = self.duration / 1.5; 127 | 128 | CAAnimationGroup *groupAnimation = [CAAnimationGroup animation]; 129 | groupAnimation.animations = @[inAnimation, outAnimation]; 130 | groupAnimation.duration = self.duration + outAnimation.beginTime; 131 | groupAnimation.repeatCount = INFINITY; 132 | groupAnimation.delegate = self; 133 | 134 | CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; 135 | rotationAnimation.fromValue = @(0); 136 | rotationAnimation.toValue = @(M_PI * 2); 137 | rotationAnimation.duration = self.duration * 1.5; 138 | rotationAnimation.repeatCount = INFINITY; 139 | 140 | [self.shapeLayer addAnimation:rotationAnimation forKey:nil]; 141 | [self.shapeLayer addAnimation:groupAnimation forKey:nil]; 142 | 143 | self.shapeLayer.hidden = NO; 144 | } 145 | 146 | - (void)stopAnimating 147 | { 148 | [UIView animateWithDuration:0.5 animations:^{ 149 | 150 | // Nice fade and ride 151 | self.contentView.transform = CGAffineTransformMakeScale(1.2, 1.2); 152 | self.contentView.alpha = 0.0; 153 | 154 | } completion:^(BOOL finished) { 155 | 156 | _animating = NO; 157 | 158 | /// ...and reset back 159 | self.contentView.transform = CGAffineTransformMakeScale(1.0, 1.0); 160 | self.contentView.alpha = 1.0; 161 | 162 | self.shapeLayer.hidden = self.hidesWhenStopped; 163 | [self.shapeLayer removeAllAnimations]; 164 | }]; 165 | } 166 | 167 | - (void)setColor:(UIColor *)color 168 | { 169 | [self willChangeValueForKey:@"color"]; 170 | 171 | _color = color; 172 | self.shapeLayer.strokeColor = [color CGColor]; 173 | 174 | [self didChangeValueForKey:@"color"]; 175 | } 176 | 177 | @end 178 | -------------------------------------------------------------------------------- /Preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phillipcaudell/PCAngularActivityIndicatorView/6acfadf6edbe1f0b6424b51cc873f8d38ab3331e/Preview.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PCAngularActivityIndicatorView 2 | 3 | ![Preview](Preview.gif) 4 | 5 | PCAngularActivityIndicatorView is a drop-in replacement for UIActivityIndicatorView on iOS that mimicks Google's Material loader. 6 | 7 | ## Usage 8 | Use exactly the same way as you would use UIActivityIndicatorView. 9 | 10 | 1. Include `PCAngularActivityIndicatorView.h` and `PCAngularActivityIndicatorView.m` into your project, then import `PCAngularActivityIndicatorView.h` in the class you wish to use it. 11 | 12 | ```objc 13 | #import "PCAngularActivityIndicatorView.h" 14 | ``` 15 | 16 | 2. Create an instance and add to your view. 17 | 18 | ```objc 19 | self.activityIndicator = [[PCAngularActivityIndicatorView alloc] initWithActivityIndicatorStyle:PCAngularActivityIndicatorViewStyleLarge]; 20 | self.activityIndicator.color = [UIColor redColor]; 21 | [self.activityIndicator startAnimation]; 22 | [self.view addSubview:self.activityIndicator]; 23 | ``` 24 | 25 | ## License 26 | 27 | Copyright (c) 2014 Phillip Caudell phillipcaudell@gmail.com 28 | 29 | The MIT License 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 34 | 35 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------------