├── CircleAnimationView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── CircleAnimationView.xccheckout │ └── xcuserdata │ │ └── chenaibin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── chenaibin.xcuserdatad │ └── xcschemes │ ├── CircleAnimationView.xcscheme │ └── xcschememanagement.plist ├── CircleAnimationView ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── CircleAnimationView.h ├── CircleAnimationView.m ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── CircleAnimationViewTests ├── CircleAnimationViewTests.m └── Info.plist ├── README.md ├── screenshot.gif └── screenshot2.gif /CircleAnimationView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 69EB0C931AAEA37200CED3B9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 69EB0C921AAEA37200CED3B9 /* main.m */; }; 11 | 69EB0C961AAEA37200CED3B9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 69EB0C951AAEA37200CED3B9 /* AppDelegate.m */; }; 12 | 69EB0C991AAEA37200CED3B9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69EB0C981AAEA37200CED3B9 /* ViewController.m */; }; 13 | 69EB0C9C1AAEA37200CED3B9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69EB0C9A1AAEA37200CED3B9 /* Main.storyboard */; }; 14 | 69EB0C9E1AAEA37200CED3B9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 69EB0C9D1AAEA37200CED3B9 /* Images.xcassets */; }; 15 | 69EB0CA11AAEA37200CED3B9 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 69EB0C9F1AAEA37200CED3B9 /* LaunchScreen.xib */; }; 16 | 69EB0CAD1AAEA37200CED3B9 /* CircleAnimationViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 69EB0CAC1AAEA37200CED3B9 /* CircleAnimationViewTests.m */; }; 17 | 69EB0CB81AAEA38C00CED3B9 /* CircleAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 69EB0CB71AAEA38C00CED3B9 /* CircleAnimationView.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 69EB0CA71AAEA37200CED3B9 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 69EB0C851AAEA37200CED3B9 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 69EB0C8C1AAEA37200CED3B9; 26 | remoteInfo = CircleAnimationView; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 69EB0C8D1AAEA37200CED3B9 /* CircleAnimationView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CircleAnimationView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 69EB0C911AAEA37200CED3B9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | 69EB0C921AAEA37200CED3B9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | 69EB0C941AAEA37200CED3B9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | 69EB0C951AAEA37200CED3B9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | 69EB0C971AAEA37200CED3B9 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 37 | 69EB0C981AAEA37200CED3B9 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 38 | 69EB0C9B1AAEA37200CED3B9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 39 | 69EB0C9D1AAEA37200CED3B9 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 40 | 69EB0CA01AAEA37200CED3B9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 41 | 69EB0CA61AAEA37200CED3B9 /* CircleAnimationViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CircleAnimationViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 69EB0CAB1AAEA37200CED3B9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 69EB0CAC1AAEA37200CED3B9 /* CircleAnimationViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CircleAnimationViewTests.m; sourceTree = ""; }; 44 | 69EB0CB61AAEA38C00CED3B9 /* CircleAnimationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleAnimationView.h; sourceTree = ""; }; 45 | 69EB0CB71AAEA38C00CED3B9 /* CircleAnimationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CircleAnimationView.m; sourceTree = ""; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | 69EB0C8A1AAEA37200CED3B9 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | 69EB0CA31AAEA37200CED3B9 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 69EB0C841AAEA37200CED3B9 = { 67 | isa = PBXGroup; 68 | children = ( 69 | 69EB0C8F1AAEA37200CED3B9 /* CircleAnimationView */, 70 | 69EB0CA91AAEA37200CED3B9 /* CircleAnimationViewTests */, 71 | 69EB0C8E1AAEA37200CED3B9 /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 69EB0C8E1AAEA37200CED3B9 /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 69EB0C8D1AAEA37200CED3B9 /* CircleAnimationView.app */, 79 | 69EB0CA61AAEA37200CED3B9 /* CircleAnimationViewTests.xctest */, 80 | ); 81 | name = Products; 82 | sourceTree = ""; 83 | }; 84 | 69EB0C8F1AAEA37200CED3B9 /* CircleAnimationView */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 69EB0C941AAEA37200CED3B9 /* AppDelegate.h */, 88 | 69EB0C951AAEA37200CED3B9 /* AppDelegate.m */, 89 | 69EB0C971AAEA37200CED3B9 /* ViewController.h */, 90 | 69EB0C981AAEA37200CED3B9 /* ViewController.m */, 91 | 69EB0CB61AAEA38C00CED3B9 /* CircleAnimationView.h */, 92 | 69EB0CB71AAEA38C00CED3B9 /* CircleAnimationView.m */, 93 | 69EB0C9A1AAEA37200CED3B9 /* Main.storyboard */, 94 | 69EB0C9D1AAEA37200CED3B9 /* Images.xcassets */, 95 | 69EB0C9F1AAEA37200CED3B9 /* LaunchScreen.xib */, 96 | 69EB0C901AAEA37200CED3B9 /* Supporting Files */, 97 | ); 98 | path = CircleAnimationView; 99 | sourceTree = ""; 100 | }; 101 | 69EB0C901AAEA37200CED3B9 /* Supporting Files */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 69EB0C911AAEA37200CED3B9 /* Info.plist */, 105 | 69EB0C921AAEA37200CED3B9 /* main.m */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | 69EB0CA91AAEA37200CED3B9 /* CircleAnimationViewTests */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 69EB0CAC1AAEA37200CED3B9 /* CircleAnimationViewTests.m */, 114 | 69EB0CAA1AAEA37200CED3B9 /* Supporting Files */, 115 | ); 116 | path = CircleAnimationViewTests; 117 | sourceTree = ""; 118 | }; 119 | 69EB0CAA1AAEA37200CED3B9 /* Supporting Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 69EB0CAB1AAEA37200CED3B9 /* Info.plist */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXNativeTarget section */ 130 | 69EB0C8C1AAEA37200CED3B9 /* CircleAnimationView */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = 69EB0CB01AAEA37200CED3B9 /* Build configuration list for PBXNativeTarget "CircleAnimationView" */; 133 | buildPhases = ( 134 | 69EB0C891AAEA37200CED3B9 /* Sources */, 135 | 69EB0C8A1AAEA37200CED3B9 /* Frameworks */, 136 | 69EB0C8B1AAEA37200CED3B9 /* Resources */, 137 | ); 138 | buildRules = ( 139 | ); 140 | dependencies = ( 141 | ); 142 | name = CircleAnimationView; 143 | productName = CircleAnimationView; 144 | productReference = 69EB0C8D1AAEA37200CED3B9 /* CircleAnimationView.app */; 145 | productType = "com.apple.product-type.application"; 146 | }; 147 | 69EB0CA51AAEA37200CED3B9 /* CircleAnimationViewTests */ = { 148 | isa = PBXNativeTarget; 149 | buildConfigurationList = 69EB0CB31AAEA37200CED3B9 /* Build configuration list for PBXNativeTarget "CircleAnimationViewTests" */; 150 | buildPhases = ( 151 | 69EB0CA21AAEA37200CED3B9 /* Sources */, 152 | 69EB0CA31AAEA37200CED3B9 /* Frameworks */, 153 | 69EB0CA41AAEA37200CED3B9 /* Resources */, 154 | ); 155 | buildRules = ( 156 | ); 157 | dependencies = ( 158 | 69EB0CA81AAEA37200CED3B9 /* PBXTargetDependency */, 159 | ); 160 | name = CircleAnimationViewTests; 161 | productName = CircleAnimationViewTests; 162 | productReference = 69EB0CA61AAEA37200CED3B9 /* CircleAnimationViewTests.xctest */; 163 | productType = "com.apple.product-type.bundle.unit-test"; 164 | }; 165 | /* End PBXNativeTarget section */ 166 | 167 | /* Begin PBXProject section */ 168 | 69EB0C851AAEA37200CED3B9 /* Project object */ = { 169 | isa = PBXProject; 170 | attributes = { 171 | LastUpgradeCheck = 0610; 172 | ORGANIZATIONNAME = "陈爱彬"; 173 | TargetAttributes = { 174 | 69EB0C8C1AAEA37200CED3B9 = { 175 | CreatedOnToolsVersion = 6.1.1; 176 | }; 177 | 69EB0CA51AAEA37200CED3B9 = { 178 | CreatedOnToolsVersion = 6.1.1; 179 | TestTargetID = 69EB0C8C1AAEA37200CED3B9; 180 | }; 181 | }; 182 | }; 183 | buildConfigurationList = 69EB0C881AAEA37200CED3B9 /* Build configuration list for PBXProject "CircleAnimationView" */; 184 | compatibilityVersion = "Xcode 3.2"; 185 | developmentRegion = English; 186 | hasScannedForEncodings = 0; 187 | knownRegions = ( 188 | en, 189 | Base, 190 | ); 191 | mainGroup = 69EB0C841AAEA37200CED3B9; 192 | productRefGroup = 69EB0C8E1AAEA37200CED3B9 /* Products */; 193 | projectDirPath = ""; 194 | projectRoot = ""; 195 | targets = ( 196 | 69EB0C8C1AAEA37200CED3B9 /* CircleAnimationView */, 197 | 69EB0CA51AAEA37200CED3B9 /* CircleAnimationViewTests */, 198 | ); 199 | }; 200 | /* End PBXProject section */ 201 | 202 | /* Begin PBXResourcesBuildPhase section */ 203 | 69EB0C8B1AAEA37200CED3B9 /* Resources */ = { 204 | isa = PBXResourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 69EB0C9C1AAEA37200CED3B9 /* Main.storyboard in Resources */, 208 | 69EB0CA11AAEA37200CED3B9 /* LaunchScreen.xib in Resources */, 209 | 69EB0C9E1AAEA37200CED3B9 /* Images.xcassets in Resources */, 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | }; 213 | 69EB0CA41AAEA37200CED3B9 /* Resources */ = { 214 | isa = PBXResourcesBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXResourcesBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 69EB0C891AAEA37200CED3B9 /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 69EB0C991AAEA37200CED3B9 /* ViewController.m in Sources */, 228 | 69EB0CB81AAEA38C00CED3B9 /* CircleAnimationView.m in Sources */, 229 | 69EB0C961AAEA37200CED3B9 /* AppDelegate.m in Sources */, 230 | 69EB0C931AAEA37200CED3B9 /* main.m in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | 69EB0CA21AAEA37200CED3B9 /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 69EB0CAD1AAEA37200CED3B9 /* CircleAnimationViewTests.m in Sources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | /* End PBXSourcesBuildPhase section */ 243 | 244 | /* Begin PBXTargetDependency section */ 245 | 69EB0CA81AAEA37200CED3B9 /* PBXTargetDependency */ = { 246 | isa = PBXTargetDependency; 247 | target = 69EB0C8C1AAEA37200CED3B9 /* CircleAnimationView */; 248 | targetProxy = 69EB0CA71AAEA37200CED3B9 /* PBXContainerItemProxy */; 249 | }; 250 | /* End PBXTargetDependency section */ 251 | 252 | /* Begin PBXVariantGroup section */ 253 | 69EB0C9A1AAEA37200CED3B9 /* Main.storyboard */ = { 254 | isa = PBXVariantGroup; 255 | children = ( 256 | 69EB0C9B1AAEA37200CED3B9 /* Base */, 257 | ); 258 | name = Main.storyboard; 259 | sourceTree = ""; 260 | }; 261 | 69EB0C9F1AAEA37200CED3B9 /* LaunchScreen.xib */ = { 262 | isa = PBXVariantGroup; 263 | children = ( 264 | 69EB0CA01AAEA37200CED3B9 /* Base */, 265 | ); 266 | name = LaunchScreen.xib; 267 | sourceTree = ""; 268 | }; 269 | /* End PBXVariantGroup section */ 270 | 271 | /* Begin XCBuildConfiguration section */ 272 | 69EB0CAE1AAEA37200CED3B9 /* Debug */ = { 273 | isa = XCBuildConfiguration; 274 | buildSettings = { 275 | ALWAYS_SEARCH_USER_PATHS = NO; 276 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 277 | CLANG_CXX_LIBRARY = "libc++"; 278 | CLANG_ENABLE_MODULES = YES; 279 | CLANG_ENABLE_OBJC_ARC = YES; 280 | CLANG_WARN_BOOL_CONVERSION = YES; 281 | CLANG_WARN_CONSTANT_CONVERSION = YES; 282 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 283 | CLANG_WARN_EMPTY_BODY = YES; 284 | CLANG_WARN_ENUM_CONVERSION = YES; 285 | CLANG_WARN_INT_CONVERSION = YES; 286 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 287 | CLANG_WARN_UNREACHABLE_CODE = YES; 288 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 289 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 290 | COPY_PHASE_STRIP = NO; 291 | ENABLE_STRICT_OBJC_MSGSEND = YES; 292 | GCC_C_LANGUAGE_STANDARD = gnu99; 293 | GCC_DYNAMIC_NO_PIC = NO; 294 | GCC_OPTIMIZATION_LEVEL = 0; 295 | GCC_PREPROCESSOR_DEFINITIONS = ( 296 | "DEBUG=1", 297 | "$(inherited)", 298 | ); 299 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 300 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 301 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 302 | GCC_WARN_UNDECLARED_SELECTOR = YES; 303 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 304 | GCC_WARN_UNUSED_FUNCTION = YES; 305 | GCC_WARN_UNUSED_VARIABLE = YES; 306 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 307 | MTL_ENABLE_DEBUG_INFO = YES; 308 | ONLY_ACTIVE_ARCH = YES; 309 | SDKROOT = iphoneos; 310 | TARGETED_DEVICE_FAMILY = "1,2"; 311 | }; 312 | name = Debug; 313 | }; 314 | 69EB0CAF1AAEA37200CED3B9 /* Release */ = { 315 | isa = XCBuildConfiguration; 316 | buildSettings = { 317 | ALWAYS_SEARCH_USER_PATHS = NO; 318 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 319 | CLANG_CXX_LIBRARY = "libc++"; 320 | CLANG_ENABLE_MODULES = YES; 321 | CLANG_ENABLE_OBJC_ARC = YES; 322 | CLANG_WARN_BOOL_CONVERSION = YES; 323 | CLANG_WARN_CONSTANT_CONVERSION = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_EMPTY_BODY = YES; 326 | CLANG_WARN_ENUM_CONVERSION = YES; 327 | CLANG_WARN_INT_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 332 | COPY_PHASE_STRIP = YES; 333 | ENABLE_NS_ASSERTIONS = NO; 334 | ENABLE_STRICT_OBJC_MSGSEND = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 337 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 338 | GCC_WARN_UNDECLARED_SELECTOR = YES; 339 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 340 | GCC_WARN_UNUSED_FUNCTION = YES; 341 | GCC_WARN_UNUSED_VARIABLE = YES; 342 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 343 | MTL_ENABLE_DEBUG_INFO = NO; 344 | SDKROOT = iphoneos; 345 | TARGETED_DEVICE_FAMILY = "1,2"; 346 | VALIDATE_PRODUCT = YES; 347 | }; 348 | name = Release; 349 | }; 350 | 69EB0CB11AAEA37200CED3B9 /* Debug */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 354 | INFOPLIST_FILE = CircleAnimationView/Info.plist; 355 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 356 | PRODUCT_NAME = "$(TARGET_NAME)"; 357 | }; 358 | name = Debug; 359 | }; 360 | 69EB0CB21AAEA37200CED3B9 /* Release */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 364 | INFOPLIST_FILE = CircleAnimationView/Info.plist; 365 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 366 | PRODUCT_NAME = "$(TARGET_NAME)"; 367 | }; 368 | name = Release; 369 | }; 370 | 69EB0CB41AAEA37200CED3B9 /* Debug */ = { 371 | isa = XCBuildConfiguration; 372 | buildSettings = { 373 | BUNDLE_LOADER = "$(TEST_HOST)"; 374 | FRAMEWORK_SEARCH_PATHS = ( 375 | "$(SDKROOT)/Developer/Library/Frameworks", 376 | "$(inherited)", 377 | ); 378 | GCC_PREPROCESSOR_DEFINITIONS = ( 379 | "DEBUG=1", 380 | "$(inherited)", 381 | ); 382 | INFOPLIST_FILE = CircleAnimationViewTests/Info.plist; 383 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 384 | PRODUCT_NAME = "$(TARGET_NAME)"; 385 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CircleAnimationView.app/CircleAnimationView"; 386 | }; 387 | name = Debug; 388 | }; 389 | 69EB0CB51AAEA37200CED3B9 /* Release */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | BUNDLE_LOADER = "$(TEST_HOST)"; 393 | FRAMEWORK_SEARCH_PATHS = ( 394 | "$(SDKROOT)/Developer/Library/Frameworks", 395 | "$(inherited)", 396 | ); 397 | INFOPLIST_FILE = CircleAnimationViewTests/Info.plist; 398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 399 | PRODUCT_NAME = "$(TARGET_NAME)"; 400 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CircleAnimationView.app/CircleAnimationView"; 401 | }; 402 | name = Release; 403 | }; 404 | /* End XCBuildConfiguration section */ 405 | 406 | /* Begin XCConfigurationList section */ 407 | 69EB0C881AAEA37200CED3B9 /* Build configuration list for PBXProject "CircleAnimationView" */ = { 408 | isa = XCConfigurationList; 409 | buildConfigurations = ( 410 | 69EB0CAE1AAEA37200CED3B9 /* Debug */, 411 | 69EB0CAF1AAEA37200CED3B9 /* Release */, 412 | ); 413 | defaultConfigurationIsVisible = 0; 414 | defaultConfigurationName = Release; 415 | }; 416 | 69EB0CB01AAEA37200CED3B9 /* Build configuration list for PBXNativeTarget "CircleAnimationView" */ = { 417 | isa = XCConfigurationList; 418 | buildConfigurations = ( 419 | 69EB0CB11AAEA37200CED3B9 /* Debug */, 420 | 69EB0CB21AAEA37200CED3B9 /* Release */, 421 | ); 422 | defaultConfigurationIsVisible = 0; 423 | }; 424 | 69EB0CB31AAEA37200CED3B9 /* Build configuration list for PBXNativeTarget "CircleAnimationViewTests" */ = { 425 | isa = XCConfigurationList; 426 | buildConfigurations = ( 427 | 69EB0CB41AAEA37200CED3B9 /* Debug */, 428 | 69EB0CB51AAEA37200CED3B9 /* Release */, 429 | ); 430 | defaultConfigurationIsVisible = 0; 431 | }; 432 | /* End XCConfigurationList section */ 433 | }; 434 | rootObject = 69EB0C851AAEA37200CED3B9 /* Project object */; 435 | } 436 | -------------------------------------------------------------------------------- /CircleAnimationView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CircleAnimationView.xcodeproj/project.xcworkspace/xcshareddata/CircleAnimationView.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 3FA6C143-1A3B-4A3E-A0DF-7C1CCE17DDE7 9 | IDESourceControlProjectName 10 | CircleAnimationView 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 66ABCD11F87505D72948CE18B6949368CA671A62 14 | https://github.com/cocoa-chen/CircleAnimationView.git 15 | 16 | IDESourceControlProjectPath 17 | CircleAnimationView.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 66ABCD11F87505D72948CE18B6949368CA671A62 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/cocoa-chen/CircleAnimationView.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 66ABCD11F87505D72948CE18B6949368CA671A62 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 66ABCD11F87505D72948CE18B6949368CA671A62 36 | IDESourceControlWCCName 37 | CircleAnimationView 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /CircleAnimationView.xcodeproj/project.xcworkspace/xcuserdata/chenaibin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoa-chen/CircleAnimationView/b9cf130da6407a14f09f030d50ebc8df444ff996/CircleAnimationView.xcodeproj/project.xcworkspace/xcuserdata/chenaibin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CircleAnimationView.xcodeproj/xcuserdata/chenaibin.xcuserdatad/xcschemes/CircleAnimationView.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 | -------------------------------------------------------------------------------- /CircleAnimationView.xcodeproj/xcuserdata/chenaibin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CircleAnimationView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 69EB0C8C1AAEA37200CED3B9 16 | 17 | primary 18 | 19 | 20 | 69EB0CA51AAEA37200CED3B9 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CircleAnimationView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CircleAnimationView 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /CircleAnimationView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CircleAnimationView 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /CircleAnimationView/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 | -------------------------------------------------------------------------------- /CircleAnimationView/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 | -------------------------------------------------------------------------------- /CircleAnimationView/CircleAnimationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CircleAnimationView.h 3 | // PYAdCheck 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, CircleType) { 12 | CircleTypeRing = 0, 13 | CircleTypeRound, 14 | }; 15 | 16 | @interface CircleAnimationView : UIView 17 | 18 | //默认是Ring类型 19 | @property (nonatomic) CircleType circleType; 20 | //如果circleType为CircleTypeRound,则该颜色为动画圆的颜色,默认为magentaColor 21 | @property (nonatomic) UIColor *animatingRoundColor; 22 | 23 | @property (nonatomic) UIColor *circleColor; 24 | @property (nonatomic) CGFloat zoomFactor; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /CircleAnimationView/CircleAnimationView.m: -------------------------------------------------------------------------------- 1 | // 2 | // CircleAnimationView.m 3 | // PYAdCheck 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import "CircleAnimationView.h" 10 | 11 | @interface CircleAnimationView() 12 | { 13 | CGFloat radius; 14 | } 15 | @property (nonatomic,strong) CAShapeLayer *circleLayer; 16 | @property (nonatomic,strong) CAShapeLayer *ringLayer; 17 | @end 18 | @implementation CircleAnimationView 19 | 20 | - (instancetype)initWithFrame:(CGRect)frame 21 | { 22 | self = [super initWithFrame:frame]; 23 | if (self) { 24 | _circleType = CircleTypeRing; 25 | _animatingRoundColor = [UIColor magentaColor]; 26 | _circleColor = [UIColor colorWithRed:31/255.f green:100/255.f blue:1 alpha:1.f]; 27 | _zoomFactor = 6; 28 | [self setup]; 29 | [self startAnimation]; 30 | } 31 | return self; 32 | } 33 | - (void)setup 34 | { 35 | self.backgroundColor = [UIColor clearColor]; 36 | radius = CGRectGetWidth(self.frame) / 4; 37 | 38 | self.circleLayer = [CAShapeLayer layer]; 39 | self.circleLayer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(CGRectGetWidth(self.frame) / 2 - radius, CGRectGetHeight(self.frame) / 2 - radius, radius * 2, radius * 2) cornerRadius:radius].CGPath; 40 | self.circleLayer.strokeColor = _circleColor.CGColor; 41 | self.circleLayer.fillColor = _circleColor.CGColor; 42 | self.circleLayer.lineWidth = 1.f; 43 | 44 | self.ringLayer = [CAShapeLayer layer]; 45 | self.ringLayer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(CGRectGetWidth(self.frame) / 2 - radius, CGRectGetHeight(self.frame) / 2 - radius, radius * 2, radius * 2) cornerRadius:radius].CGPath; 46 | self.ringLayer.strokeColor = _circleColor.CGColor; 47 | self.ringLayer.fillColor = nil; 48 | self.ringLayer.lineWidth = 1.f; 49 | 50 | [self.layer addSublayer:self.ringLayer]; 51 | [self.layer addSublayer:self.circleLayer]; 52 | } 53 | - (void)setCircleColor:(UIColor *)circleColor 54 | { 55 | _circleColor = circleColor; 56 | self.circleLayer.strokeColor = _circleColor.CGColor; 57 | self.circleLayer.fillColor = _circleColor.CGColor; 58 | if (_circleType == CircleTypeRing) { 59 | self.ringLayer.strokeColor = _circleColor.CGColor; 60 | } 61 | } 62 | - (void)setCircleType:(CircleType)circleType 63 | { 64 | _circleType = circleType; 65 | if (_circleType == CircleTypeRound) { 66 | self.ringLayer.fillColor = _animatingRoundColor.CGColor; 67 | self.ringLayer.strokeColor = _animatingRoundColor.CGColor; 68 | }else if (_circleType == CircleTypeRing) { 69 | self.ringLayer.strokeColor = _circleColor.CGColor; 70 | } 71 | } 72 | - (void)startAnimation 73 | { 74 | CABasicAnimation *opacityAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; 75 | opacityAnimation.fromValue = @1.f; 76 | opacityAnimation.toValue = @0.f; 77 | opacityAnimation.duration = 2.5f; 78 | [self.ringLayer addAnimation:opacityAnimation forKey:@"alpha"]; 79 | 80 | UIBezierPath *originPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(CGRectGetWidth(self.frame) / 2 - radius, CGRectGetHeight(self.frame) / 2 - radius, radius * 2, radius * 2) cornerRadius:radius]; 81 | UIBezierPath *finalPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(CGRectGetWidth(self.frame) / 2 - radius * _zoomFactor, CGRectGetHeight(self.frame) / 2 - radius * _zoomFactor, radius * 2 * _zoomFactor, radius * 2 * _zoomFactor) cornerRadius:radius * _zoomFactor]; 82 | CABasicAnimation *pathAnimation = [CABasicAnimation animationWithKeyPath:@"path"]; 83 | pathAnimation.fromValue = (__bridge id)(originPath.CGPath); 84 | pathAnimation.toValue = (__bridge id)(finalPath.CGPath); 85 | pathAnimation.duration = 2.5f; 86 | pathAnimation.delegate = self; 87 | pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 88 | [self.ringLayer addAnimation:pathAnimation forKey:@"pathAnimation"]; 89 | 90 | } 91 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag 92 | { 93 | if (flag) { 94 | [self startAnimation]; 95 | } 96 | } 97 | @end 98 | -------------------------------------------------------------------------------- /CircleAnimationView/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /CircleAnimationView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.cab.$(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 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /CircleAnimationView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CircleAnimationView 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CircleAnimationView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CircleAnimationView 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "CircleAnimationView.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | CircleAnimationView *animationView = [[CircleAnimationView alloc] initWithFrame:CGRectMake(150, 200, 24, 24)]; 22 | animationView.circleType = CircleTypeRing; 23 | [self.view addSubview:animationView]; 24 | } 25 | 26 | - (void)didReceiveMemoryWarning { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /CircleAnimationView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CircleAnimationView 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /CircleAnimationViewTests/CircleAnimationViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CircleAnimationViewTests.m 3 | // CircleAnimationViewTests 4 | // 5 | // Created by 陈爱彬 on 15/3/10. 6 | // Copyright (c) 2015年 陈爱彬. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface CircleAnimationViewTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation CircleAnimationViewTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /CircleAnimationViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.ipinyou.$(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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CircleAnimationView 2 | 3 | ####圆环放大效果,设置circleType为CircleTypeRing,效果如下: 4 | ``` 5 | CircleAnimationView *animationView = [[CircleAnimationView alloc] initWithFrame:CGRectMake(150, 200, 24, 24)]; 6 | animationView.circleType = CircleTypeRing; 7 | [self.view addSubview:animationView]; 8 | 9 | ``` 10 | ![](https://raw.githubusercontent.com/cocoa-chen/CircleAnimationView/master/screenshot.gif) 11 | 12 | ####实心放大效果,设置circleType为CircleTypeRound,效果如下: 13 | ``` 14 | CircleAnimationView *animationView = [[CircleAnimationView alloc] initWithFrame:CGRectMake(150, 200, 24, 24)]; 15 | animationView.circleType = CircleTypeRound; 16 | [self.view addSubview:animationView]; 17 | 18 | ``` 19 | ![](https://raw.githubusercontent.com/cocoa-chen/CircleAnimationView/master/screenshot2.gif) -------------------------------------------------------------------------------- /screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoa-chen/CircleAnimationView/b9cf130da6407a14f09f030d50ebc8df444ff996/screenshot.gif -------------------------------------------------------------------------------- /screenshot2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoa-chen/CircleAnimationView/b9cf130da6407a14f09f030d50ebc8df444ff996/screenshot2.gif --------------------------------------------------------------------------------