├── README.md ├── SLImageLoader.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── liusilan.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── liusilan.xcuserdatad │ └── xcschemes │ ├── SLImageLoader.xcscheme │ └── xcschememanagement.plist ├── SLImageLoader ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── ImageLoader │ ├── SLImageLoaderView.h │ ├── SLImageLoaderView.m │ ├── UIImageView+SLImageLoader.h │ └── UIImageView+SLImageLoader.m ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── ViewController.h ├── ViewController.m ├── main.m └── test@2x.png └── SLImageLoaderTests ├── Info.plist └── SLImageLoaderTests.m /README.md: -------------------------------------------------------------------------------- 1 | # SLImageLoader 2 | 图片加载动画 3 | 像水波形式的,由中心像四周展开的动画 4 | -------------------------------------------------------------------------------- /SLImageLoader.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | AD31AC5A1ABA67F200B08564 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AD31AC591ABA67F200B08564 /* main.m */; }; 11 | AD31AC5D1ABA67F200B08564 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AD31AC5C1ABA67F200B08564 /* AppDelegate.m */; }; 12 | AD31AC601ABA67F200B08564 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AD31AC5F1ABA67F200B08564 /* ViewController.m */; }; 13 | AD31AC631ABA67F200B08564 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AD31AC611ABA67F200B08564 /* Main.storyboard */; }; 14 | AD31AC651ABA67F200B08564 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD31AC641ABA67F200B08564 /* Images.xcassets */; }; 15 | AD31AC681ABA67F200B08564 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD31AC661ABA67F200B08564 /* LaunchScreen.xib */; }; 16 | AD31AC741ABA67F300B08564 /* SLImageLoaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AD31AC731ABA67F300B08564 /* SLImageLoaderTests.m */; }; 17 | AD31AC801ABA686D00B08564 /* SLImageLoaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = AD31AC7F1ABA686D00B08564 /* SLImageLoaderView.m */; }; 18 | AD31AC861ABA68ED00B08564 /* UIImageView+SLImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = AD31AC851ABA68ED00B08564 /* UIImageView+SLImageLoader.m */; }; 19 | AD31AC881ABA6B8800B08564 /* test@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AD31AC871ABA6B8800B08564 /* test@2x.png */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | AD31AC6E1ABA67F300B08564 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = AD31AC4C1ABA67F200B08564 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = AD31AC531ABA67F200B08564; 28 | remoteInfo = SLImageLoader; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | AD31AC541ABA67F200B08564 /* SLImageLoader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SLImageLoader.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | AD31AC581ABA67F200B08564 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | AD31AC591ABA67F200B08564 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 36 | AD31AC5B1ABA67F200B08564 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 37 | AD31AC5C1ABA67F200B08564 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 38 | AD31AC5E1ABA67F200B08564 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 39 | AD31AC5F1ABA67F200B08564 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 40 | AD31AC621ABA67F200B08564 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 41 | AD31AC641ABA67F200B08564 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 42 | AD31AC671ABA67F200B08564 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 43 | AD31AC6D1ABA67F200B08564 /* SLImageLoaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SLImageLoaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | AD31AC721ABA67F300B08564 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | AD31AC731ABA67F300B08564 /* SLImageLoaderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SLImageLoaderTests.m; sourceTree = ""; }; 46 | AD31AC7E1ABA686D00B08564 /* SLImageLoaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLImageLoaderView.h; sourceTree = ""; }; 47 | AD31AC7F1ABA686D00B08564 /* SLImageLoaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLImageLoaderView.m; sourceTree = ""; }; 48 | AD31AC841ABA68ED00B08564 /* UIImageView+SLImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+SLImageLoader.h"; sourceTree = ""; }; 49 | AD31AC851ABA68ED00B08564 /* UIImageView+SLImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+SLImageLoader.m"; sourceTree = ""; }; 50 | AD31AC871ABA6B8800B08564 /* test@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "test@2x.png"; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | AD31AC511ABA67F200B08564 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | AD31AC6A1ABA67F200B08564 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | AD31AC4B1ABA67F200B08564 = { 72 | isa = PBXGroup; 73 | children = ( 74 | AD31AC561ABA67F200B08564 /* SLImageLoader */, 75 | AD31AC701ABA67F300B08564 /* SLImageLoaderTests */, 76 | AD31AC551ABA67F200B08564 /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | AD31AC551ABA67F200B08564 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | AD31AC541ABA67F200B08564 /* SLImageLoader.app */, 84 | AD31AC6D1ABA67F200B08564 /* SLImageLoaderTests.xctest */, 85 | ); 86 | name = Products; 87 | sourceTree = ""; 88 | }; 89 | AD31AC561ABA67F200B08564 /* SLImageLoader */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | AD31AC871ABA6B8800B08564 /* test@2x.png */, 93 | AD31AC7D1ABA685700B08564 /* ImageLoader */, 94 | AD31AC5B1ABA67F200B08564 /* AppDelegate.h */, 95 | AD31AC5C1ABA67F200B08564 /* AppDelegate.m */, 96 | AD31AC5E1ABA67F200B08564 /* ViewController.h */, 97 | AD31AC5F1ABA67F200B08564 /* ViewController.m */, 98 | AD31AC611ABA67F200B08564 /* Main.storyboard */, 99 | AD31AC641ABA67F200B08564 /* Images.xcassets */, 100 | AD31AC661ABA67F200B08564 /* LaunchScreen.xib */, 101 | AD31AC571ABA67F200B08564 /* Supporting Files */, 102 | ); 103 | path = SLImageLoader; 104 | sourceTree = ""; 105 | }; 106 | AD31AC571ABA67F200B08564 /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | AD31AC581ABA67F200B08564 /* Info.plist */, 110 | AD31AC591ABA67F200B08564 /* main.m */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | AD31AC701ABA67F300B08564 /* SLImageLoaderTests */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | AD31AC731ABA67F300B08564 /* SLImageLoaderTests.m */, 119 | AD31AC711ABA67F300B08564 /* Supporting Files */, 120 | ); 121 | path = SLImageLoaderTests; 122 | sourceTree = ""; 123 | }; 124 | AD31AC711ABA67F300B08564 /* Supporting Files */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | AD31AC721ABA67F300B08564 /* Info.plist */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | AD31AC7D1ABA685700B08564 /* ImageLoader */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | AD31AC7E1ABA686D00B08564 /* SLImageLoaderView.h */, 136 | AD31AC7F1ABA686D00B08564 /* SLImageLoaderView.m */, 137 | AD31AC841ABA68ED00B08564 /* UIImageView+SLImageLoader.h */, 138 | AD31AC851ABA68ED00B08564 /* UIImageView+SLImageLoader.m */, 139 | ); 140 | path = ImageLoader; 141 | sourceTree = ""; 142 | }; 143 | /* End PBXGroup section */ 144 | 145 | /* Begin PBXNativeTarget section */ 146 | AD31AC531ABA67F200B08564 /* SLImageLoader */ = { 147 | isa = PBXNativeTarget; 148 | buildConfigurationList = AD31AC771ABA67F300B08564 /* Build configuration list for PBXNativeTarget "SLImageLoader" */; 149 | buildPhases = ( 150 | AD31AC501ABA67F200B08564 /* Sources */, 151 | AD31AC511ABA67F200B08564 /* Frameworks */, 152 | AD31AC521ABA67F200B08564 /* Resources */, 153 | ); 154 | buildRules = ( 155 | ); 156 | dependencies = ( 157 | ); 158 | name = SLImageLoader; 159 | productName = SLImageLoader; 160 | productReference = AD31AC541ABA67F200B08564 /* SLImageLoader.app */; 161 | productType = "com.apple.product-type.application"; 162 | }; 163 | AD31AC6C1ABA67F200B08564 /* SLImageLoaderTests */ = { 164 | isa = PBXNativeTarget; 165 | buildConfigurationList = AD31AC7A1ABA67F300B08564 /* Build configuration list for PBXNativeTarget "SLImageLoaderTests" */; 166 | buildPhases = ( 167 | AD31AC691ABA67F200B08564 /* Sources */, 168 | AD31AC6A1ABA67F200B08564 /* Frameworks */, 169 | AD31AC6B1ABA67F200B08564 /* Resources */, 170 | ); 171 | buildRules = ( 172 | ); 173 | dependencies = ( 174 | AD31AC6F1ABA67F300B08564 /* PBXTargetDependency */, 175 | ); 176 | name = SLImageLoaderTests; 177 | productName = SLImageLoaderTests; 178 | productReference = AD31AC6D1ABA67F200B08564 /* SLImageLoaderTests.xctest */; 179 | productType = "com.apple.product-type.bundle.unit-test"; 180 | }; 181 | /* End PBXNativeTarget section */ 182 | 183 | /* Begin PBXProject section */ 184 | AD31AC4C1ABA67F200B08564 /* Project object */ = { 185 | isa = PBXProject; 186 | attributes = { 187 | LastUpgradeCheck = 0620; 188 | ORGANIZATIONNAME = "YY, Inc"; 189 | TargetAttributes = { 190 | AD31AC531ABA67F200B08564 = { 191 | CreatedOnToolsVersion = 6.2; 192 | }; 193 | AD31AC6C1ABA67F200B08564 = { 194 | CreatedOnToolsVersion = 6.2; 195 | TestTargetID = AD31AC531ABA67F200B08564; 196 | }; 197 | }; 198 | }; 199 | buildConfigurationList = AD31AC4F1ABA67F200B08564 /* Build configuration list for PBXProject "SLImageLoader" */; 200 | compatibilityVersion = "Xcode 3.2"; 201 | developmentRegion = English; 202 | hasScannedForEncodings = 0; 203 | knownRegions = ( 204 | en, 205 | Base, 206 | ); 207 | mainGroup = AD31AC4B1ABA67F200B08564; 208 | productRefGroup = AD31AC551ABA67F200B08564 /* Products */; 209 | projectDirPath = ""; 210 | projectRoot = ""; 211 | targets = ( 212 | AD31AC531ABA67F200B08564 /* SLImageLoader */, 213 | AD31AC6C1ABA67F200B08564 /* SLImageLoaderTests */, 214 | ); 215 | }; 216 | /* End PBXProject section */ 217 | 218 | /* Begin PBXResourcesBuildPhase section */ 219 | AD31AC521ABA67F200B08564 /* Resources */ = { 220 | isa = PBXResourcesBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | AD31AC881ABA6B8800B08564 /* test@2x.png in Resources */, 224 | AD31AC631ABA67F200B08564 /* Main.storyboard in Resources */, 225 | AD31AC681ABA67F200B08564 /* LaunchScreen.xib in Resources */, 226 | AD31AC651ABA67F200B08564 /* Images.xcassets in Resources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | AD31AC6B1ABA67F200B08564 /* Resources */ = { 231 | isa = PBXResourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | /* End PBXResourcesBuildPhase section */ 238 | 239 | /* Begin PBXSourcesBuildPhase section */ 240 | AD31AC501ABA67F200B08564 /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | AD31AC601ABA67F200B08564 /* ViewController.m in Sources */, 245 | AD31AC5D1ABA67F200B08564 /* AppDelegate.m in Sources */, 246 | AD31AC801ABA686D00B08564 /* SLImageLoaderView.m in Sources */, 247 | AD31AC861ABA68ED00B08564 /* UIImageView+SLImageLoader.m in Sources */, 248 | AD31AC5A1ABA67F200B08564 /* main.m in Sources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | AD31AC691ABA67F200B08564 /* Sources */ = { 253 | isa = PBXSourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | AD31AC741ABA67F300B08564 /* SLImageLoaderTests.m in Sources */, 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | }; 260 | /* End PBXSourcesBuildPhase section */ 261 | 262 | /* Begin PBXTargetDependency section */ 263 | AD31AC6F1ABA67F300B08564 /* PBXTargetDependency */ = { 264 | isa = PBXTargetDependency; 265 | target = AD31AC531ABA67F200B08564 /* SLImageLoader */; 266 | targetProxy = AD31AC6E1ABA67F300B08564 /* PBXContainerItemProxy */; 267 | }; 268 | /* End PBXTargetDependency section */ 269 | 270 | /* Begin PBXVariantGroup section */ 271 | AD31AC611ABA67F200B08564 /* Main.storyboard */ = { 272 | isa = PBXVariantGroup; 273 | children = ( 274 | AD31AC621ABA67F200B08564 /* Base */, 275 | ); 276 | name = Main.storyboard; 277 | sourceTree = ""; 278 | }; 279 | AD31AC661ABA67F200B08564 /* LaunchScreen.xib */ = { 280 | isa = PBXVariantGroup; 281 | children = ( 282 | AD31AC671ABA67F200B08564 /* Base */, 283 | ); 284 | name = LaunchScreen.xib; 285 | sourceTree = ""; 286 | }; 287 | /* End PBXVariantGroup section */ 288 | 289 | /* Begin XCBuildConfiguration section */ 290 | AD31AC751ABA67F300B08564 /* Debug */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | ALWAYS_SEARCH_USER_PATHS = NO; 294 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 295 | CLANG_CXX_LIBRARY = "libc++"; 296 | CLANG_ENABLE_MODULES = YES; 297 | CLANG_ENABLE_OBJC_ARC = YES; 298 | CLANG_WARN_BOOL_CONVERSION = YES; 299 | CLANG_WARN_CONSTANT_CONVERSION = YES; 300 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 301 | CLANG_WARN_EMPTY_BODY = YES; 302 | CLANG_WARN_ENUM_CONVERSION = YES; 303 | CLANG_WARN_INT_CONVERSION = YES; 304 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 305 | CLANG_WARN_UNREACHABLE_CODE = YES; 306 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 307 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 308 | COPY_PHASE_STRIP = NO; 309 | ENABLE_STRICT_OBJC_MSGSEND = YES; 310 | GCC_C_LANGUAGE_STANDARD = gnu99; 311 | GCC_DYNAMIC_NO_PIC = NO; 312 | GCC_OPTIMIZATION_LEVEL = 0; 313 | GCC_PREPROCESSOR_DEFINITIONS = ( 314 | "DEBUG=1", 315 | "$(inherited)", 316 | ); 317 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 318 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 319 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 320 | GCC_WARN_UNDECLARED_SELECTOR = YES; 321 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 322 | GCC_WARN_UNUSED_FUNCTION = YES; 323 | GCC_WARN_UNUSED_VARIABLE = YES; 324 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 325 | MTL_ENABLE_DEBUG_INFO = YES; 326 | ONLY_ACTIVE_ARCH = YES; 327 | SDKROOT = iphoneos; 328 | TARGETED_DEVICE_FAMILY = "1,2"; 329 | }; 330 | name = Debug; 331 | }; 332 | AD31AC761ABA67F300B08564 /* Release */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 337 | CLANG_CXX_LIBRARY = "libc++"; 338 | CLANG_ENABLE_MODULES = YES; 339 | CLANG_ENABLE_OBJC_ARC = YES; 340 | CLANG_WARN_BOOL_CONVERSION = YES; 341 | CLANG_WARN_CONSTANT_CONVERSION = YES; 342 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 343 | CLANG_WARN_EMPTY_BODY = YES; 344 | CLANG_WARN_ENUM_CONVERSION = YES; 345 | CLANG_WARN_INT_CONVERSION = YES; 346 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 347 | CLANG_WARN_UNREACHABLE_CODE = YES; 348 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 349 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 350 | COPY_PHASE_STRIP = NO; 351 | ENABLE_NS_ASSERTIONS = NO; 352 | ENABLE_STRICT_OBJC_MSGSEND = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu99; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | AD31AC781ABA67F300B08564 /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | INFOPLIST_FILE = SLImageLoader/Info.plist; 373 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 374 | PRODUCT_NAME = "$(TARGET_NAME)"; 375 | }; 376 | name = Debug; 377 | }; 378 | AD31AC791ABA67F300B08564 /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 382 | INFOPLIST_FILE = SLImageLoader/Info.plist; 383 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 384 | PRODUCT_NAME = "$(TARGET_NAME)"; 385 | }; 386 | name = Release; 387 | }; 388 | AD31AC7B1ABA67F300B08564 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | BUNDLE_LOADER = "$(TEST_HOST)"; 392 | FRAMEWORK_SEARCH_PATHS = ( 393 | "$(SDKROOT)/Developer/Library/Frameworks", 394 | "$(inherited)", 395 | ); 396 | GCC_PREPROCESSOR_DEFINITIONS = ( 397 | "DEBUG=1", 398 | "$(inherited)", 399 | ); 400 | INFOPLIST_FILE = SLImageLoaderTests/Info.plist; 401 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 402 | PRODUCT_NAME = "$(TARGET_NAME)"; 403 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SLImageLoader.app/SLImageLoader"; 404 | }; 405 | name = Debug; 406 | }; 407 | AD31AC7C1ABA67F300B08564 /* Release */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | BUNDLE_LOADER = "$(TEST_HOST)"; 411 | FRAMEWORK_SEARCH_PATHS = ( 412 | "$(SDKROOT)/Developer/Library/Frameworks", 413 | "$(inherited)", 414 | ); 415 | INFOPLIST_FILE = SLImageLoaderTests/Info.plist; 416 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 417 | PRODUCT_NAME = "$(TARGET_NAME)"; 418 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SLImageLoader.app/SLImageLoader"; 419 | }; 420 | name = Release; 421 | }; 422 | /* End XCBuildConfiguration section */ 423 | 424 | /* Begin XCConfigurationList section */ 425 | AD31AC4F1ABA67F200B08564 /* Build configuration list for PBXProject "SLImageLoader" */ = { 426 | isa = XCConfigurationList; 427 | buildConfigurations = ( 428 | AD31AC751ABA67F300B08564 /* Debug */, 429 | AD31AC761ABA67F300B08564 /* Release */, 430 | ); 431 | defaultConfigurationIsVisible = 0; 432 | defaultConfigurationName = Release; 433 | }; 434 | AD31AC771ABA67F300B08564 /* Build configuration list for PBXNativeTarget "SLImageLoader" */ = { 435 | isa = XCConfigurationList; 436 | buildConfigurations = ( 437 | AD31AC781ABA67F300B08564 /* Debug */, 438 | AD31AC791ABA67F300B08564 /* Release */, 439 | ); 440 | defaultConfigurationIsVisible = 0; 441 | }; 442 | AD31AC7A1ABA67F300B08564 /* Build configuration list for PBXNativeTarget "SLImageLoaderTests" */ = { 443 | isa = XCConfigurationList; 444 | buildConfigurations = ( 445 | AD31AC7B1ABA67F300B08564 /* Debug */, 446 | AD31AC7C1ABA67F300B08564 /* Release */, 447 | ); 448 | defaultConfigurationIsVisible = 0; 449 | }; 450 | /* End XCConfigurationList section */ 451 | }; 452 | rootObject = AD31AC4C1ABA67F200B08564 /* Project object */; 453 | } 454 | -------------------------------------------------------------------------------- /SLImageLoader.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SLImageLoader.xcodeproj/project.xcworkspace/xcuserdata/liusilan.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silan-liu/SLImageLoader/89bea81992e0bf678104f49baf3a706e9d1a2b37/SLImageLoader.xcodeproj/project.xcworkspace/xcuserdata/liusilan.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SLImageLoader.xcodeproj/xcuserdata/liusilan.xcuserdatad/xcschemes/SLImageLoader.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 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /SLImageLoader.xcodeproj/xcuserdata/liusilan.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SLImageLoader.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | AD31AC531ABA67F200B08564 16 | 17 | primary 18 | 19 | 20 | AD31AC6C1ABA67F200B08564 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SLImageLoader/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. 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 | -------------------------------------------------------------------------------- /SLImageLoader/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. 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 | -------------------------------------------------------------------------------- /SLImageLoader/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 | -------------------------------------------------------------------------------- /SLImageLoader/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /SLImageLoader/ImageLoader/SLImageLoaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SLImageLoaderView.h 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SLImageLoaderView : UIView 12 | 13 | - (void)reveal; 14 | 15 | - (void)startLoading; 16 | - (void)stopLoading; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /SLImageLoader/ImageLoader/SLImageLoaderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SLImageLoaderView.m 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. All rights reserved. 7 | // 8 | 9 | #import "SLImageLoaderView.h" 10 | 11 | @implementation SLImageLoaderView 12 | { 13 | CAShapeLayer *_circleLayer; 14 | CAShapeLayer *_pathLayer; 15 | } 16 | 17 | - (instancetype)initWithFrame:(CGRect)frame 18 | { 19 | self = [super initWithFrame:frame]; 20 | if (self) { 21 | 22 | _circleLayer = [CAShapeLayer layer]; 23 | 24 | _circleLayer.strokeColor = [UIColor redColor].CGColor; 25 | _circleLayer.fillColor = [UIColor clearColor].CGColor; 26 | _circleLayer.lineWidth = 2; 27 | 28 | [self.layer addSublayer:_circleLayer]; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)layoutSubviews 34 | { 35 | [super layoutSubviews]; 36 | 37 | CGPoint center = CGPointMake(self.frame.size.width / 2, self.frame.size.height / 2); 38 | 39 | UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:center radius:20 startAngle:0 endAngle:M_PI_2 * 3 clockwise:YES]; 40 | 41 | _circleLayer.frame = self.bounds; 42 | _circleLayer.path = path.CGPath; 43 | } 44 | 45 | - (void)startLoading 46 | { 47 | // animation 48 | CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; 49 | 50 | rotationAnimation.toValue = @(M_PI * 2); 51 | rotationAnimation.repeatCount = 3; 52 | rotationAnimation.duration = 1; 53 | 54 | // 区分type 55 | [rotationAnimation setValue:@"rotation" forKey:@"animationType"]; 56 | rotationAnimation.delegate = self; 57 | 58 | [_circleLayer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; 59 | } 60 | 61 | - (void)stopLoading 62 | { 63 | [_circleLayer removeAnimationForKey:@"rotationAnimation"]; 64 | 65 | [_circleLayer removeFromSuperlayer]; 66 | _circleLayer = nil; 67 | } 68 | 69 | - (void)startPathAnimation 70 | { 71 | if (!_pathLayer) 72 | { 73 | _pathLayer = [CAShapeLayer layer]; 74 | _pathLayer.frame = self.bounds; 75 | 76 | UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.frame.size.width / 2,self.frame.size.height / 2) radius:20 startAngle:0 endAngle:M_PI * 2 clockwise:YES]; 77 | 78 | _pathLayer.path = path.CGPath; 79 | } 80 | 81 | // mask 82 | self.superview.layer.mask = _pathLayer; 83 | 84 | CABasicAnimation *pathAnimation = [CABasicAnimation animationWithKeyPath:NSStringFromSelector(@selector(path))]; 85 | 86 | pathAnimation.delegate = self; 87 | pathAnimation.duration = 1; 88 | pathAnimation.toValue = (__bridge id)([self toPath].CGPath); 89 | 90 | // 区分type 91 | [pathAnimation setValue:@"path" forKey:@"animationType"]; 92 | 93 | [_pathLayer addAnimation:pathAnimation forKey:@"pathAnimation"]; 94 | } 95 | 96 | - (void)reveal 97 | { 98 | [self startLoading]; 99 | } 100 | 101 | - (UIBezierPath *)toPath 102 | { 103 | CGPoint center = CGPointMake(self.frame.size.width / 2, self.frame.size.height / 2); 104 | 105 | UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:center radius:MAX(self.frame.size.width, self.frame.size.height) startAngle:0 endAngle:M_PI * 2 clockwise:YES]; 106 | 107 | return path; 108 | } 109 | 110 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag 111 | { 112 | NSString *animationType = [anim valueForKey:@"animationType"]; 113 | if ([animationType isEqualToString:@"rotation"]) 114 | { 115 | [_circleLayer removeAllAnimations]; 116 | [_circleLayer removeFromSuperlayer]; 117 | _circleLayer = nil; 118 | 119 | [self startPathAnimation]; 120 | } 121 | else 122 | { 123 | self.superview.layer.mask = nil; 124 | [_pathLayer removeAllAnimations]; 125 | [self removeFromSuperview]; 126 | } 127 | } 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /SLImageLoader/ImageLoader/UIImageView+SLImageLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+SLImageLoader.h 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface UIImageView (SLImageLoader) 13 | 14 | - (void)initLoader; 15 | - (void)reveal; 16 | 17 | - (void)startLoading; 18 | - (void)stopLoading; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /SLImageLoader/ImageLoader/UIImageView+SLImageLoader.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+SLImageLoader.m 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. All rights reserved. 7 | // 8 | 9 | #import "UIImageView+SLImageLoader.h" 10 | #import "SLImageLoaderView.h" 11 | #import "objc/runtime.h" 12 | 13 | @implementation UIImageView (SLImageLoader) 14 | 15 | - (SLImageLoaderView*)imageLoaderView 16 | { 17 | SLImageLoaderView *loaderView = objc_getAssociatedObject(self, @selector(imageLoaderView)); 18 | if (!loaderView) { 19 | loaderView = [SLImageLoaderView new]; 20 | loaderView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 21 | objc_setAssociatedObject(self, @selector(imageLoaderView), loaderView, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 22 | } 23 | return loaderView; 24 | } 25 | 26 | - (void)startLoading 27 | { 28 | [[self imageLoaderView] startLoading]; 29 | } 30 | 31 | - (void)stopLoading 32 | { 33 | [[self imageLoaderView] stopLoading]; 34 | } 35 | 36 | - (void)initLoader 37 | { 38 | SLImageLoaderView *loaderView = self.imageLoaderView; 39 | loaderView.frame = self.bounds; 40 | [self addSubview:loaderView]; 41 | } 42 | 43 | - (void)reveal 44 | { 45 | [self.imageLoaderView reveal]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /SLImageLoader/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 | } -------------------------------------------------------------------------------- /SLImageLoader/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.yy.$(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 | -------------------------------------------------------------------------------- /SLImageLoader/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @property (nonatomic, weak) IBOutlet UIImageView *imageView; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /SLImageLoader/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIImageView+SLImageLoader.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 | 22 | [_imageView initLoader]; 23 | [_imageView reveal]; 24 | } 25 | 26 | - (void)didReceiveMemoryWarning { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /SLImageLoader/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SLImageLoader 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. 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 | -------------------------------------------------------------------------------- /SLImageLoader/test@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/silan-liu/SLImageLoader/89bea81992e0bf678104f49baf3a706e9d1a2b37/SLImageLoader/test@2x.png -------------------------------------------------------------------------------- /SLImageLoaderTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.yy.$(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 | -------------------------------------------------------------------------------- /SLImageLoaderTests/SLImageLoaderTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // SLImageLoaderTests.m 3 | // SLImageLoaderTests 4 | // 5 | // Created by liusilan on 15/3/19. 6 | // Copyright (c) 2015年 YY, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface SLImageLoaderTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation SLImageLoaderTests 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 | --------------------------------------------------------------------------------