├── CSWAnimatedImageViewExample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── cworley.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── cworley.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── CSWAnimatedImageViewExample.xcscheme │ └── xcschememanagement.plist ├── CSWAnimatedImageViewExample ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-40@2x.png │ │ ├── Icon-40@3x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Small@2x.png │ │ └── Icon-Small@3x.png │ ├── Default.imageset │ │ ├── Contents.json │ │ └── Default@2x.png │ ├── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── Default-568h@2x.png │ │ └── Default@2x.png │ └── hg.imageset │ │ ├── Contents.json │ │ └── hg.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── ColorViewController.h ├── ColorViewController.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── LICENSE ├── Podfile ├── README.md └── ScreenShot ├── ScreenShot0.gif ├── ScreenShot2.gif ├── ScreenShot2.png └── ScreenShot3.png /CSWAnimatedImageViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8AAF78DF87A172785D2DF6E5 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1993FAB9D24667FA0D1C64F0 /* libPods.a */; }; 11 | CE86660F1BE84D1F00C27640 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CE86660E1BE84D1F00C27640 /* main.m */; }; 12 | CE8666121BE84D1F00C27640 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE8666111BE84D1F00C27640 /* AppDelegate.m */; }; 13 | CE8666151BE84D1F00C27640 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE8666141BE84D1F00C27640 /* ViewController.m */; }; 14 | CE8666181BE84D1F00C27640 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE8666161BE84D1F00C27640 /* Main.storyboard */; }; 15 | CE86661A1BE84D1F00C27640 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE8666191BE84D1F00C27640 /* Assets.xcassets */; }; 16 | CE86661D1BE84D1F00C27640 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE86661B1BE84D1F00C27640 /* LaunchScreen.storyboard */; }; 17 | CE8666271BE84DD000C27640 /* ColorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE8666251BE84DD000C27640 /* ColorViewController.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 0AADBA33520916395C8B329D /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 22 | 1993FAB9D24667FA0D1C64F0 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 4097239D0858E473B36491BE /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 24 | CE86660A1BE84D1F00C27640 /* CSWAnimatedImageViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CSWAnimatedImageViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | CE86660E1BE84D1F00C27640 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 26 | CE8666101BE84D1F00C27640 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 27 | CE8666111BE84D1F00C27640 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 28 | CE8666131BE84D1F00C27640 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 29 | CE8666141BE84D1F00C27640 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 30 | CE8666171BE84D1F00C27640 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 31 | CE8666191BE84D1F00C27640 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 32 | CE86661C1BE84D1F00C27640 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 33 | CE86661E1BE84D1F00C27640 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | CE8666241BE84DD000C27640 /* ColorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorViewController.h; sourceTree = ""; }; 35 | CE8666251BE84DD000C27640 /* ColorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorViewController.m; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | CE8666071BE84D1F00C27640 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 8AAF78DF87A172785D2DF6E5 /* libPods.a in Frameworks */, 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXFrameworksBuildPhase section */ 48 | 49 | /* Begin PBXGroup section */ 50 | 65F24B78288308FF586C3A5E /* Frameworks */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 1993FAB9D24667FA0D1C64F0 /* libPods.a */, 54 | ); 55 | name = Frameworks; 56 | sourceTree = ""; 57 | }; 58 | AE01F71E1C4B35D78D2A88CE /* Pods */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 0AADBA33520916395C8B329D /* Pods.debug.xcconfig */, 62 | 4097239D0858E473B36491BE /* Pods.release.xcconfig */, 63 | ); 64 | name = Pods; 65 | sourceTree = ""; 66 | }; 67 | CE8666011BE84D1F00C27640 = { 68 | isa = PBXGroup; 69 | children = ( 70 | CE86660C1BE84D1F00C27640 /* CSWAnimatedImageViewExample */, 71 | CE86660B1BE84D1F00C27640 /* Products */, 72 | AE01F71E1C4B35D78D2A88CE /* Pods */, 73 | 65F24B78288308FF586C3A5E /* Frameworks */, 74 | ); 75 | sourceTree = ""; 76 | }; 77 | CE86660B1BE84D1F00C27640 /* Products */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | CE86660A1BE84D1F00C27640 /* CSWAnimatedImageViewExample.app */, 81 | ); 82 | name = Products; 83 | sourceTree = ""; 84 | }; 85 | CE86660C1BE84D1F00C27640 /* CSWAnimatedImageViewExample */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | CE8666241BE84DD000C27640 /* ColorViewController.h */, 89 | CE8666251BE84DD000C27640 /* ColorViewController.m */, 90 | CE8666101BE84D1F00C27640 /* AppDelegate.h */, 91 | CE8666111BE84D1F00C27640 /* AppDelegate.m */, 92 | CE8666131BE84D1F00C27640 /* ViewController.h */, 93 | CE8666141BE84D1F00C27640 /* ViewController.m */, 94 | CE8666161BE84D1F00C27640 /* Main.storyboard */, 95 | CE8666191BE84D1F00C27640 /* Assets.xcassets */, 96 | CE86661B1BE84D1F00C27640 /* LaunchScreen.storyboard */, 97 | CE86661E1BE84D1F00C27640 /* Info.plist */, 98 | CE86660D1BE84D1F00C27640 /* Supporting Files */, 99 | ); 100 | path = CSWAnimatedImageViewExample; 101 | sourceTree = ""; 102 | }; 103 | CE86660D1BE84D1F00C27640 /* Supporting Files */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | CE86660E1BE84D1F00C27640 /* main.m */, 107 | ); 108 | name = "Supporting Files"; 109 | sourceTree = ""; 110 | }; 111 | /* End PBXGroup section */ 112 | 113 | /* Begin PBXNativeTarget section */ 114 | CE8666091BE84D1F00C27640 /* CSWAnimatedImageViewExample */ = { 115 | isa = PBXNativeTarget; 116 | buildConfigurationList = CE8666211BE84D1F00C27640 /* Build configuration list for PBXNativeTarget "CSWAnimatedImageViewExample" */; 117 | buildPhases = ( 118 | F1131532BA542548731C4C61 /* Check Pods Manifest.lock */, 119 | CE8666061BE84D1F00C27640 /* Sources */, 120 | CE8666071BE84D1F00C27640 /* Frameworks */, 121 | CE8666081BE84D1F00C27640 /* Resources */, 122 | 7F223F9CBFFF20A79534C023 /* Copy Pods Resources */, 123 | ); 124 | buildRules = ( 125 | ); 126 | dependencies = ( 127 | ); 128 | name = CSWAnimatedImageViewExample; 129 | productName = CSWAnimatedImageViewExample; 130 | productReference = CE86660A1BE84D1F00C27640 /* CSWAnimatedImageViewExample.app */; 131 | productType = "com.apple.product-type.application"; 132 | }; 133 | /* End PBXNativeTarget section */ 134 | 135 | /* Begin PBXProject section */ 136 | CE8666021BE84D1F00C27640 /* Project object */ = { 137 | isa = PBXProject; 138 | attributes = { 139 | LastUpgradeCheck = 0710; 140 | ORGANIZATIONNAME = stashdump.com; 141 | TargetAttributes = { 142 | CE8666091BE84D1F00C27640 = { 143 | CreatedOnToolsVersion = 7.1; 144 | }; 145 | }; 146 | }; 147 | buildConfigurationList = CE8666051BE84D1F00C27640 /* Build configuration list for PBXProject "CSWAnimatedImageViewExample" */; 148 | compatibilityVersion = "Xcode 3.2"; 149 | developmentRegion = English; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | Base, 154 | ); 155 | mainGroup = CE8666011BE84D1F00C27640; 156 | productRefGroup = CE86660B1BE84D1F00C27640 /* Products */; 157 | projectDirPath = ""; 158 | projectRoot = ""; 159 | targets = ( 160 | CE8666091BE84D1F00C27640 /* CSWAnimatedImageViewExample */, 161 | ); 162 | }; 163 | /* End PBXProject section */ 164 | 165 | /* Begin PBXResourcesBuildPhase section */ 166 | CE8666081BE84D1F00C27640 /* Resources */ = { 167 | isa = PBXResourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | CE86661D1BE84D1F00C27640 /* LaunchScreen.storyboard in Resources */, 171 | CE86661A1BE84D1F00C27640 /* Assets.xcassets in Resources */, 172 | CE8666181BE84D1F00C27640 /* Main.storyboard in Resources */, 173 | ); 174 | runOnlyForDeploymentPostprocessing = 0; 175 | }; 176 | /* End PBXResourcesBuildPhase section */ 177 | 178 | /* Begin PBXShellScriptBuildPhase section */ 179 | 7F223F9CBFFF20A79534C023 /* Copy Pods Resources */ = { 180 | isa = PBXShellScriptBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | ); 184 | inputPaths = ( 185 | ); 186 | name = "Copy Pods Resources"; 187 | outputPaths = ( 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | shellPath = /bin/sh; 191 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 192 | showEnvVarsInLog = 0; 193 | }; 194 | F1131532BA542548731C4C61 /* Check Pods Manifest.lock */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Check Pods Manifest.lock"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 207 | showEnvVarsInLog = 0; 208 | }; 209 | /* End PBXShellScriptBuildPhase section */ 210 | 211 | /* Begin PBXSourcesBuildPhase section */ 212 | CE8666061BE84D1F00C27640 /* Sources */ = { 213 | isa = PBXSourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | CE8666151BE84D1F00C27640 /* ViewController.m in Sources */, 217 | CE8666121BE84D1F00C27640 /* AppDelegate.m in Sources */, 218 | CE8666271BE84DD000C27640 /* ColorViewController.m in Sources */, 219 | CE86660F1BE84D1F00C27640 /* main.m in Sources */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | /* End PBXSourcesBuildPhase section */ 224 | 225 | /* Begin PBXVariantGroup section */ 226 | CE8666161BE84D1F00C27640 /* Main.storyboard */ = { 227 | isa = PBXVariantGroup; 228 | children = ( 229 | CE8666171BE84D1F00C27640 /* Base */, 230 | ); 231 | name = Main.storyboard; 232 | sourceTree = ""; 233 | }; 234 | CE86661B1BE84D1F00C27640 /* LaunchScreen.storyboard */ = { 235 | isa = PBXVariantGroup; 236 | children = ( 237 | CE86661C1BE84D1F00C27640 /* Base */, 238 | ); 239 | name = LaunchScreen.storyboard; 240 | sourceTree = ""; 241 | }; 242 | /* End PBXVariantGroup section */ 243 | 244 | /* Begin XCBuildConfiguration section */ 245 | CE86661F1BE84D1F00C27640 /* Debug */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | ALWAYS_SEARCH_USER_PATHS = NO; 249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 250 | CLANG_CXX_LIBRARY = "libc++"; 251 | CLANG_ENABLE_MODULES = YES; 252 | CLANG_ENABLE_OBJC_ARC = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_CONSTANT_CONVERSION = YES; 255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = dwarf; 265 | ENABLE_STRICT_OBJC_MSGSEND = YES; 266 | ENABLE_TESTABILITY = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_DYNAMIC_NO_PIC = NO; 269 | GCC_NO_COMMON_BLOCKS = YES; 270 | GCC_OPTIMIZATION_LEVEL = 0; 271 | GCC_PREPROCESSOR_DEFINITIONS = ( 272 | "DEBUG=1", 273 | "$(inherited)", 274 | ); 275 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 276 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 277 | GCC_WARN_UNDECLARED_SELECTOR = YES; 278 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 279 | GCC_WARN_UNUSED_FUNCTION = YES; 280 | GCC_WARN_UNUSED_VARIABLE = YES; 281 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 282 | MTL_ENABLE_DEBUG_INFO = YES; 283 | ONLY_ACTIVE_ARCH = YES; 284 | SDKROOT = iphoneos; 285 | TARGETED_DEVICE_FAMILY = "1,2"; 286 | }; 287 | name = Debug; 288 | }; 289 | CE8666201BE84D1F00C27640 /* Release */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | ALWAYS_SEARCH_USER_PATHS = NO; 293 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 294 | CLANG_CXX_LIBRARY = "libc++"; 295 | CLANG_ENABLE_MODULES = YES; 296 | CLANG_ENABLE_OBJC_ARC = YES; 297 | CLANG_WARN_BOOL_CONVERSION = YES; 298 | CLANG_WARN_CONSTANT_CONVERSION = YES; 299 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 300 | CLANG_WARN_EMPTY_BODY = YES; 301 | CLANG_WARN_ENUM_CONVERSION = YES; 302 | CLANG_WARN_INT_CONVERSION = YES; 303 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 304 | CLANG_WARN_UNREACHABLE_CODE = YES; 305 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 306 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 307 | COPY_PHASE_STRIP = NO; 308 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 309 | ENABLE_NS_ASSERTIONS = NO; 310 | ENABLE_STRICT_OBJC_MSGSEND = YES; 311 | GCC_C_LANGUAGE_STANDARD = gnu99; 312 | GCC_NO_COMMON_BLOCKS = YES; 313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 314 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 315 | GCC_WARN_UNDECLARED_SELECTOR = YES; 316 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 317 | GCC_WARN_UNUSED_FUNCTION = YES; 318 | GCC_WARN_UNUSED_VARIABLE = YES; 319 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 320 | MTL_ENABLE_DEBUG_INFO = NO; 321 | SDKROOT = iphoneos; 322 | TARGETED_DEVICE_FAMILY = "1,2"; 323 | VALIDATE_PRODUCT = YES; 324 | }; 325 | name = Release; 326 | }; 327 | CE8666221BE84D1F00C27640 /* Debug */ = { 328 | isa = XCBuildConfiguration; 329 | baseConfigurationReference = 0AADBA33520916395C8B329D /* Pods.debug.xcconfig */; 330 | buildSettings = { 331 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 332 | INFOPLIST_FILE = CSWAnimatedImageViewExample/Info.plist; 333 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 334 | PRODUCT_BUNDLE_IDENTIFIER = StashDump.CSWAnimatedImageViewExample; 335 | PRODUCT_NAME = "$(TARGET_NAME)"; 336 | }; 337 | name = Debug; 338 | }; 339 | CE8666231BE84D1F00C27640 /* Release */ = { 340 | isa = XCBuildConfiguration; 341 | baseConfigurationReference = 4097239D0858E473B36491BE /* Pods.release.xcconfig */; 342 | buildSettings = { 343 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 344 | INFOPLIST_FILE = CSWAnimatedImageViewExample/Info.plist; 345 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 346 | PRODUCT_BUNDLE_IDENTIFIER = StashDump.CSWAnimatedImageViewExample; 347 | PRODUCT_NAME = "$(TARGET_NAME)"; 348 | }; 349 | name = Release; 350 | }; 351 | /* End XCBuildConfiguration section */ 352 | 353 | /* Begin XCConfigurationList section */ 354 | CE8666051BE84D1F00C27640 /* Build configuration list for PBXProject "CSWAnimatedImageViewExample" */ = { 355 | isa = XCConfigurationList; 356 | buildConfigurations = ( 357 | CE86661F1BE84D1F00C27640 /* Debug */, 358 | CE8666201BE84D1F00C27640 /* Release */, 359 | ); 360 | defaultConfigurationIsVisible = 0; 361 | defaultConfigurationName = Release; 362 | }; 363 | CE8666211BE84D1F00C27640 /* Build configuration list for PBXNativeTarget "CSWAnimatedImageViewExample" */ = { 364 | isa = XCConfigurationList; 365 | buildConfigurations = ( 366 | CE8666221BE84D1F00C27640 /* Debug */, 367 | CE8666231BE84D1F00C27640 /* Release */, 368 | ); 369 | defaultConfigurationIsVisible = 0; 370 | defaultConfigurationName = Release; 371 | }; 372 | /* End XCConfigurationList section */ 373 | }; 374 | rootObject = CE8666021BE84D1F00C27640 /* Project object */; 375 | } 376 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample.xcodeproj/project.xcworkspace/xcuserdata/cworley.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample.xcodeproj/project.xcworkspace/xcuserdata/cworley.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample.xcodeproj/xcuserdata/cworley.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample.xcodeproj/xcuserdata/cworley.xcuserdatad/xcschemes/CSWAnimatedImageViewExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample.xcodeproj/xcuserdata/cworley.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CSWAnimatedImageViewExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | CE8666091BE84D1F00C27640 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CSWAnimatedImageViewExample 4 | // 5 | // Created by Christopher Worley on 11/2/15. 6 | // Copyright © 2015 stashdump.com. 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 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CSWAnimatedImageViewExample 4 | // 5 | // Created by Christopher Worley on 11/2/15. 6 | // Copyright © 2015 stashdump.com. 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 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-Small@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-Small@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "40x40", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-40@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-40@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "60x60", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-60@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-60@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "idiom" : "ipad", 41 | "size" : "29x29", 42 | "scale" : "1x" 43 | }, 44 | { 45 | "idiom" : "ipad", 46 | "size" : "29x29", 47 | "scale" : "2x" 48 | }, 49 | { 50 | "idiom" : "ipad", 51 | "size" : "40x40", 52 | "scale" : "1x" 53 | }, 54 | { 55 | "idiom" : "ipad", 56 | "size" : "40x40", 57 | "scale" : "2x" 58 | }, 59 | { 60 | "size" : "76x76", 61 | "idiom" : "ipad", 62 | "filename" : "Icon-76.png", 63 | "scale" : "1x" 64 | }, 65 | { 66 | "size" : "76x76", 67 | "idiom" : "ipad", 68 | "filename" : "Icon-76@2x.png", 69 | "scale" : "2x" 70 | } 71 | ], 72 | "info" : { 73 | "version" : 1, 74 | "author" : "xcode" 75 | } 76 | } -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/Default.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Default@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/Default.imageset/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/Default.imageset/Default@2x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "filename" : "Default@2x.png", 7 | "extent" : "full-screen", 8 | "minimum-system-version" : "7.0", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "Default-568h@2x.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | } 20 | ], 21 | "info" : { 22 | "version" : 1, 23 | "author" : "xcode" 24 | } 25 | } -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/hg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "hg.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Assets.xcassets/hg.imageset/hg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/CSWAnimatedImageViewExample/Assets.xcassets/hg.imageset/hg.png -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 92 | 99 | 106 | 113 | 120 | 127 | 134 | 141 | 148 | 155 | 167 | 179 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 263 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/ColorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ColorViewController.h 3 | // CSWAnimatedTextView 4 | // 5 | // Created by Christopher Worley on 10/30/15. 6 | // Copyright © 2015 Christopher Worley. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol ColorPickerDelegate 12 | 13 | - (void)selectedColor:(UIColor *)color; 14 | 15 | @end 16 | 17 | @interface ColorViewController : UIViewController 18 | 19 | @property (nonatomic, assign) id delegate; 20 | 21 | - (void)putInColor:(UIColor *)color; 22 | 23 | @end -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/ColorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ColorViewController.m 3 | // CSWAnimatedTextView 4 | // 5 | // Created by Christopher Worley on 10/30/15. 6 | // Copyright © 2015 Christopher Worley. All rights reserved. 7 | // 8 | 9 | #import "ColorViewController.h" 10 | #import "NKOColorPickerView.h" 11 | 12 | @interface ColorViewController () 13 | { 14 | UIColor *localColor; 15 | } 16 | 17 | @property (nonatomic, weak) IBOutlet NKOColorPickerView *pickeView; 18 | 19 | @end 20 | 21 | @implementation ColorViewController 22 | 23 | - (void)viewDidLoad { 24 | 25 | [super viewDidLoad]; 26 | 27 | [self _setupColorPicker]; 28 | } 29 | 30 | - (IBAction)exit:(id)sender { 31 | [self dismissViewControllerAnimated:YES completion:nil]; 32 | } 33 | 34 | - (IBAction)selectColor:(id)sender { 35 | [self.delegate selectedColor:localColor]; 36 | [self dismissViewControllerAnimated:YES completion:nil]; 37 | } 38 | 39 | - (void)putInColor:(UIColor *)color { 40 | localColor = color; 41 | } 42 | 43 | #pragma mark - Private methods 44 | 45 | - (void)_setupColorPicker 46 | { 47 | __weak typeof(self) weakSelf = self; 48 | id changeColorBlock = ^(UIColor *color){ 49 | typeof(self) strongSelf = weakSelf; 50 | [strongSelf _customizeButtonWithColor:color]; 51 | }; 52 | 53 | [self.pickeView setDidChangeColorBlock:changeColorBlock]; 54 | 55 | [self.pickeView setColor:localColor]; 56 | [self.pickeView setTintColor:[UIColor darkGrayColor]]; 57 | } 58 | 59 | - (void)_customizeButtonWithColor:(UIColor*)color { 60 | localColor = self.pickeView.color; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CSWAnimatedImageViewExample 4 | // 5 | // Created by Christopher Worley on 11/01/15. 6 | // Copyright © 2015 Christopher Worley. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "CSWAnimatedImageView.h" 11 | #import "ColorViewController.h" 12 | 13 | 14 | @interface ViewController : UIViewController 15 | 16 | @property (weak, nonatomic) IBOutlet CSWAnimatedImageView *imageAnimate; 17 | @property (weak, nonatomic) IBOutlet UIButton *innerColorButton; 18 | @property (weak, nonatomic) IBOutlet UIButton *outerColorButton; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CSWAnimatedImageViewExample 4 | // 5 | // Created by Christopher Worley on 11/01/15. 6 | // Copyright © 2015 Christopher Worley. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | // set to zero to initialize from this file 1 to let it init from IB 12 | #define LOAD_FROM_OBJECT 1 13 | 14 | @interface ViewController () 15 | { 16 | UIColor *firstColor; 17 | UIColor *secondColor; 18 | int colorNum; 19 | } 20 | 21 | @property (nonatomic, weak) IBOutlet UISlider *durationSlider; 22 | @property (nonatomic, weak) IBOutlet UISlider *startPointxSlider; 23 | @property (nonatomic, weak) IBOutlet UISlider *startPointySlider; 24 | @property (nonatomic, weak) IBOutlet UISlider *endPointxSlider; 25 | @property (nonatomic, weak) IBOutlet UISlider *endPointySlider; 26 | @property (nonatomic, weak) IBOutlet UILabel *durationLabel; 27 | @property (nonatomic, weak) IBOutlet UILabel *startPointxLabel; 28 | @property (nonatomic, weak) IBOutlet UILabel *startPointyLabel; 29 | @property (nonatomic, weak) IBOutlet UILabel *endPointxLabel; 30 | @property (nonatomic, weak) IBOutlet UILabel *endPointyLabel; 31 | @property (nonatomic, weak) IBOutlet UISwitch *bAutoReverse; 32 | @property (nonatomic, strong) CSWAnimatedImageObject *animatedImageObject; 33 | 34 | @end 35 | 36 | @implementation ViewController 37 | 38 | 39 | -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 40 | { 41 | 42 | if ([segue.identifier isEqualToString:@"colorPickerSegue0"]) 43 | { 44 | colorNum = 0; 45 | ColorViewController *vc = segue.destinationViewController; 46 | vc.delegate = self; 47 | 48 | [vc putInColor:firstColor]; 49 | } 50 | else if ([segue.identifier isEqualToString:@"colorPickerSegue1"]) 51 | { 52 | colorNum = 1; 53 | ColorViewController *vc = segue.destinationViewController; 54 | vc.delegate = self; 55 | 56 | [vc putInColor:secondColor]; 57 | } 58 | } 59 | 60 | - (void)viewDidLoad { 61 | [super viewDidLoad]; 62 | // Do any additional setup after loading the view, typically from a nib. 63 | 64 | _innerColorButton.layer.cornerRadius = 6; 65 | _outerColorButton.layer.cornerRadius = 6; 66 | 67 | _animatedImageObject = [[CSWAnimatedImageObject alloc] init]; 68 | 69 | if (LOAD_FROM_OBJECT) { 70 | [self setDisplayValuesFromAnimationObject]; 71 | } 72 | else { 73 | [self setDefaultValuesFromViewController]; 74 | } 75 | } 76 | 77 | - (void)setDefaultValuesFromViewController { 78 | 79 | _animatedImageObject.colorOuter = [UIColor darkGrayColor]; 80 | _animatedImageObject.colorInner = [UIColor lightGrayColor]; 81 | _animatedImageObject.startPoint = CGPointMake(0.0, 0.5); 82 | _animatedImageObject.endPoint = CGPointMake(1.0, 0.5); 83 | _animatedImageObject.duration = 2.0; 84 | _animatedImageObject.imageName = @"hg"; 85 | _animatedImageObject.reverse = YES; 86 | 87 | [self setDisplayValues]; 88 | 89 | [_imageAnimate setAnimatedImageObject:_animatedImageObject]; 90 | } 91 | 92 | - (void)setDisplayValuesFromAnimationObject { 93 | 94 | _animatedImageObject.colorOuter = _imageAnimate.colorOuter; 95 | _animatedImageObject.colorInner = _imageAnimate.colorInner; 96 | _animatedImageObject.reverse = _imageAnimate.reverse; 97 | 98 | _animatedImageObject.duration = _imageAnimate.duration; 99 | _animatedImageObject.startPoint = _imageAnimate.startPoint; 100 | _animatedImageObject.endPoint = _imageAnimate.endPoint; 101 | 102 | _animatedImageObject.imageName = _imageAnimate.imageName; 103 | 104 | 105 | [self setDisplayValues]; 106 | } 107 | 108 | - (void)setDisplayValues { 109 | _bAutoReverse.on = _animatedImageObject.reverse; 110 | 111 | firstColor = _animatedImageObject.colorOuter; 112 | secondColor = _animatedImageObject.colorInner; 113 | 114 | _innerColorButton.backgroundColor = firstColor; 115 | _outerColorButton.backgroundColor = secondColor; 116 | 117 | self.startPointxSlider.value = _animatedImageObject.startPoint.x; 118 | self.startPointySlider.value = _animatedImageObject.startPoint.y; 119 | 120 | self.endPointxSlider.value = _animatedImageObject.endPoint.x; 121 | self.endPointySlider.value = _animatedImageObject.endPoint.y; 122 | 123 | self.durationSlider.value = _animatedImageObject.duration; 124 | self.startPointxLabel.text = [NSString stringWithFormat:@"%.2f", self.startPointxSlider.value]; 125 | self.startPointyLabel.text = [NSString stringWithFormat:@"%.2f", self.startPointySlider.value]; 126 | self.endPointxLabel.text = [NSString stringWithFormat:@"%.2f", self.endPointxSlider.value]; 127 | self.endPointyLabel.text = [NSString stringWithFormat:@"%.2f", self.endPointySlider.value]; 128 | self.durationLabel.text = [NSString stringWithFormat:@"%.2f", self.durationSlider.value]; 129 | 130 | _imageAnimate.imageName = _animatedImageObject.imageName; 131 | 132 | 133 | } 134 | 135 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 136 | [self.view endEditing:YES]; 137 | } 138 | 139 | - (IBAction)pointsChanged:(id)sender { 140 | 141 | CGPoint startPoint; 142 | CGPoint endPoint; 143 | 144 | startPoint.x = _startPointxSlider.value; 145 | startPoint.y = _startPointySlider.value; 146 | 147 | endPoint.x = _endPointxSlider.value; 148 | endPoint.y = _endPointySlider.value; 149 | 150 | self.startPointxLabel.text = [NSString stringWithFormat:@"%.2f", self.startPointxSlider.value]; 151 | self.startPointyLabel.text = [NSString stringWithFormat:@"%.2f", self.startPointySlider.value]; 152 | self.endPointxLabel.text = [NSString stringWithFormat:@"%.2f", self.endPointxSlider.value]; 153 | self.endPointyLabel.text = [NSString stringWithFormat:@"%.2f", self.endPointySlider.value]; 154 | 155 | _imageAnimate.startPoint = startPoint; 156 | _imageAnimate.endPoint = endPoint; 157 | } 158 | 159 | - (IBAction)autoReverse:(id)sender { 160 | 161 | _imageAnimate.reverse = _bAutoReverse.on; 162 | } 163 | 164 | - (IBAction)durationChanged:(UISlider *)sender { 165 | 166 | _imageAnimate.duration = self.durationSlider.value; 167 | self.durationLabel.text = [NSString stringWithFormat:@"%.2f", self.durationSlider.value]; 168 | } 169 | 170 | - (void)didReceiveMemoryWarning { 171 | [super didReceiveMemoryWarning]; 172 | // Dispose of any resources that can be recreated. 173 | } 174 | 175 | #pragma mark ColorPickerDelegate 176 | 177 | - (void)selectedColor:(UIColor *)color { 178 | 179 | if (!colorNum) { 180 | firstColor = color; 181 | _innerColorButton.backgroundColor = firstColor; 182 | _imageAnimate.colorOuter = firstColor; 183 | _animatedImageObject.colorOuter = firstColor; 184 | 185 | _imageAnimate.colorInner = _animatedImageObject.colorInner; 186 | } else { 187 | secondColor = color; 188 | _outerColorButton.backgroundColor = secondColor; 189 | _imageAnimate.colorInner = secondColor; 190 | _animatedImageObject.colorInner = secondColor; 191 | 192 | _imageAnimate.colorOuter = _animatedImageObject.colorOuter; 193 | } 194 | } 195 | 196 | @end 197 | -------------------------------------------------------------------------------- /CSWAnimatedImageViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CSWAnimatedImageViewExample 4 | // 5 | // Created by Christopher Worley on 11/2/15. 6 | // Copyright © 2015 stashdump.com. 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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Christopher Worley (www.stashdump.com) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform :ios, '7.0' 3 | 4 | pod 'CSWAnimatedImageView' 5 | pod 'NKOColorPickerView' 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CSWAnimatedImageViewExample 2 | 3 | [![License](https://img.shields.io/cocoapods/l/CSWAnimatedImageView.svg?style=flat)](http://cocoapods.org/pods/CSWAnimatedImageView) 4 | [![Platform](https://img.shields.io/cocoapods/p/CSWAnimatedImageView.svg?style=flat)](http://cocoapods.org/pods/CSWAnimatedImageView) 5 | 6 | An Image View that shows the image as a color gradient that animates 7 | 8 | 9 | # Screenshot 10 | 11 | ### iPhone 12 | 13 |

14 |

15 |

16 | 17 | ## Installation 18 | 19 | Currently the way to integrate CSWAnimatedImageView is to add CSWAnimatedTextView.m and CSWAnimatedTextView.h to your project. 20 | 21 | ## How to get started 22 | 23 | Add a UIView in Interface Builder and in the identity inspector set the View's Custom Class to CSWAnimatedTextView. There are nine Key Value Coding values defined as User Defined Runtime Attributes (UDRA). There are hard coded defaults if no UDRA is defined. 24 | 25 | colorOuter - The start and end colors of the gradient 26 | colorInner - The middle color of the gradient 27 | duration - Animation loop length 28 | reverse - Should animation reverse direction 29 | imageName - Name of the image in the View 30 | startPoint - Startpoint of the gradient 31 | endPoint - Endpoint of the gradient 32 | 33 | can be added to your controller's view using Interface Builder or programmatically with the following code: 34 | identity inspector Custom Class 35 | 36 | ## Podfile 37 | ``` 38 | pod 'CSWAnimatedImageView' 39 | pod 'NKOColorPickerView' 40 | 41 | ``` 42 | 43 | # Class Project 44 | 45 | [CSWAnimatedImageView class files](https://github.com/n6xej/CSWAnimatedImageView) 46 | 47 | ## Author 48 | 49 | Christopher Worley, n6xej@aim.com 50 | 51 | # License 52 | 53 | The MIT License (MIT) 54 | 55 | Copyright (C) 2015 Christopher Worley 56 | 57 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 58 | documentation files (the "Software"), to deal in the Software without restriction, including without 59 | limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 60 | the Software, and to permit persons to whom the Software is furnished to do so, subject to the following 61 | conditions: 62 | 63 | The above copyright notice and this permission notice shall be included in all copies or substantial 64 | portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 67 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 68 | EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 69 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 70 | OR OTHER DEALINGS IN THE SOFTWARE LICENSE 71 | 72 | Attribution 73 | -------------- 74 | 75 | CSWAnimatedImageViewExample uses portions of code from the following sources. 76 | 77 | | Component | Description | License | 78 | | ------------- |:-------------:| -----:| 79 | | [NKOColorPickerView](https://github.com/nakiostudio/NKOColorPickerView) | A block based and easy to use Color Picker View for iOS. | MIT | 80 | -------------------------------------------------------------------------------- /ScreenShot/ScreenShot0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/ScreenShot/ScreenShot0.gif -------------------------------------------------------------------------------- /ScreenShot/ScreenShot2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/ScreenShot/ScreenShot2.gif -------------------------------------------------------------------------------- /ScreenShot/ScreenShot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/ScreenShot/ScreenShot2.png -------------------------------------------------------------------------------- /ScreenShot/ScreenShot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/n6xej/CSWAnimatedImageViewExample/13b39729a78a9aaf65673568041255178a16f967/ScreenShot/ScreenShot3.png --------------------------------------------------------------------------------