├── .gitignore ├── .swift-version ├── .travis.yml ├── Example ├── TheAnimationExample-iOS │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── TheAnimationExample-macOS │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Info.plist │ ├── TheAnimationExample_macOS.entitlements │ └── ViewController.swift ├── TheAnimationExample-tvOS │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── App Icon & Top Shelf Image.brandassets │ │ │ ├── App Icon - App Store.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ ├── App Icon.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Top Shelf Image Wide.imageset │ │ │ │ └── Contents.json │ │ │ └── Top Shelf Image.imageset │ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── Launch Image.launchimage │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── TheAnimationExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── TheAnimationExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Images ├── background.png ├── background_raw.png ├── basic_animation.png ├── opacity.png └── opacity_raw.png ├── LICENSE ├── README.md ├── TheAnimation.podspec ├── TheAnimation.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── TheAnimation-iOS.xcscheme │ ├── TheAnimation-macOS.xcscheme │ └── TheAnimation-tvOS.xcscheme ├── TheAnimation ├── Resource │ ├── Info-iOS.plist │ ├── Info-macOS.plist │ └── Info-tvOS.plist ├── Source │ ├── Animation.swift │ ├── AnimationGroup.swift │ ├── AnimationKeyPaths.swift │ ├── AnyAnimation.swift │ ├── BasicAnimation.swift │ ├── Internal │ │ └── CAAnimationDelegateProxy.swift │ ├── KeyframeAnimation.swift │ ├── PrimitiveAnimation.swift │ ├── PropertyAnimation.swift │ ├── SpringAnimation.swift │ ├── TimingFunction.swift │ └── TransitionAnimation.swift └── TheAnimation.h └── TheAnimationTests ├── Info.plist └── TheAnimationTests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.1 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/TheAnimation.xcworkspace -scheme TheAnimation-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-iOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TheAnimationExample 4 | // 5 | // Created by marty-suzuki on 2018/05/12. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | var window: UIWindow? 14 | 15 | #if swift(>=4.2) 16 | typealias LaunchOptionsKey = UIApplication.LaunchOptionsKey 17 | #else 18 | typealias LaunchOptionsKey = UIApplicationLaunchOptionsKey 19 | #endif 20 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [LaunchOptionsKey: Any]?) -> Bool { 21 | 22 | return true 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-iOS/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 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-iOS/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 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-iOS/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TheAnimationExample 4 | // 5 | // Created by marty-suzuki on 2018/05/12. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import QuartzCore.CoreAnimation 11 | import TheAnimation 12 | 13 | class ViewController: UIViewController { 14 | 15 | let circleLayer = CAShapeLayer() 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | let size = CGSize(width: view.bounds.size.width, 20 | height: view.bounds.size.width) 21 | 22 | ConfigureCircleLayer: do { 23 | let y = (view.bounds.height - size.height) / 2 24 | circleLayer.frame = CGRect(x: 0, y: y, width: size.width, height: size.height) 25 | circleLayer.fillColor = UIColor.green.cgColor 26 | circleLayer.needsDisplayOnBoundsChange = true 27 | view.layer.addSublayer(circleLayer) 28 | } 29 | 30 | Animation: do { 31 | let startSize = CGSize(width: 100, height: 100) 32 | let inset = (size.width / 2) - (startSize.width / 2) 33 | let startRect = circleLayer.bounds.insetBy(dx: inset, dy: inset) 34 | let startPath = UIBezierPath(ovalIn: startRect).cgPath 35 | circleLayer.path = startPath 36 | 37 | let pathAnimation = BasicAnimation(keyPath: .path) 38 | pathAnimation.toValue = UIBezierPath(ovalIn: CGRect(origin: .zero, size: size)).cgPath 39 | pathAnimation.duration = 2 40 | pathAnimation.timingFunction = .easeOut 41 | pathAnimation.fillMode = .forwards 42 | pathAnimation.isRemovedOnCompletion = false 43 | 44 | let fadeOutAnimation = BasicAnimation(keyPath: .opacity) 45 | fadeOutAnimation.fromValue = 1 46 | fadeOutAnimation.toValue = 0 47 | fadeOutAnimation.duration = 1 48 | fadeOutAnimation.beginTime = 2 49 | 50 | let animationGroup = AnimationGroup() 51 | animationGroup.duration = pathAnimation.duration + fadeOutAnimation.duration 52 | animationGroup.repeatCount = .infinity 53 | animationGroup.animations = [pathAnimation, fadeOutAnimation] 54 | animationGroup.fillMode = .forwards 55 | animationGroup.isRemovedOnCompletion = false 56 | 57 | animationGroup.setAnimationDidStart { 58 | print("animation did start") 59 | } 60 | 61 | let canceller = animationGroup.animate(in: circleLayer) 62 | 63 | animationGroup.setAnimationDidStop { finished in 64 | print("animation did stop: finished = \(finished)") 65 | } 66 | 67 | DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(7)) { 68 | canceller.cancelAnimation() 69 | } 70 | } 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-macOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TheAnimationExample-macOS 4 | // 5 | // Created by Carlos on 23/5/18. 6 | // Copyright © 2018 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-macOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-macOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-macOS/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 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 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 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 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 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | Default 529 | 530 | 531 | 532 | 533 | 534 | 535 | Left to Right 536 | 537 | 538 | 539 | 540 | 541 | 542 | Right to Left 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | Default 554 | 555 | 556 | 557 | 558 | 559 | 560 | Left to Right 561 | 562 | 563 | 564 | 565 | 566 | 567 | Right to Left 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-macOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2018 marty-suzuki. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-macOS/TheAnimationExample_macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-macOS/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TheAnimationExample-macOS 4 | // 5 | // Created by Carlos on 23/5/18. 6 | // Copyright © 2018 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import QuartzCore.CoreAnimation 11 | import TheAnimation 12 | import CoreGraphics 13 | 14 | extension NSBezierPath { 15 | 16 | var cgPath: CGPath { 17 | var immutablePath: CGPath 18 | let numElements = elementCount 19 | let path = CGMutablePath() 20 | let points = NSPointArray.allocate(capacity: 3) 21 | var didClosePath = true 22 | for i in 0.. Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv" 5 | } 6 | ], 7 | "info" : { 8 | "version" : 1, 9 | "author" : "xcode" 10 | } 11 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - App Store.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "2320x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image Wide.imageset", 19 | "role" : "top-shelf-image-wide" 20 | }, 21 | { 22 | "size" : "1920x720", 23 | "idiom" : "tv", 24 | "filename" : "Top Shelf Image.imageset", 25 | "role" : "top-shelf-image" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Assets.xcassets/Launch Image.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "landscape", 5 | "idiom" : "tv", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "11.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "landscape", 12 | "idiom" : "tv", 13 | "extent" : "full-screen", 14 | "minimum-system-version" : "9.0", 15 | "scale" : "1x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/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 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIMainStoryboardFile 24 | Main 25 | UIRequiredDeviceCapabilities 26 | 27 | arm64 28 | 29 | UIUserInterfaceStyle 30 | Automatic 31 | 32 | 33 | -------------------------------------------------------------------------------- /Example/TheAnimationExample-tvOS/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TheAnimationExample-tvOS 4 | // 5 | // Created by Carlos on 23/5/18. 6 | // Copyright © 2018 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import QuartzCore.CoreAnimation 11 | import TheAnimation 12 | 13 | class ViewController: UIViewController { 14 | 15 | let circleLayer = CAShapeLayer() 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | let size = CGSize(width: view.bounds.size.width, 20 | height: view.bounds.size.width) 21 | 22 | ConfigureCircleLayer: do { 23 | let y = (view.bounds.height - size.height) / 2 24 | circleLayer.frame = CGRect(x: 0, y: y, width: size.width, height: size.height) 25 | circleLayer.fillColor = UIColor.green.cgColor 26 | circleLayer.needsDisplayOnBoundsChange = true 27 | view.layer.addSublayer(circleLayer) 28 | } 29 | 30 | Animation: do { 31 | let startSize = CGSize(width: 100, height: 100) 32 | let inset = (size.width / 2) - (startSize.width / 2) 33 | let startRect = circleLayer.bounds.insetBy(dx: inset, dy: inset) 34 | let startPath = UIBezierPath(ovalIn: startRect).cgPath 35 | circleLayer.path = startPath 36 | 37 | let pathAnimation = BasicAnimation(keyPath: .path) 38 | pathAnimation.toValue = UIBezierPath(ovalIn: CGRect(origin: .zero, size: size)).cgPath 39 | pathAnimation.duration = 2 40 | pathAnimation.timingFunction = .easeOut 41 | pathAnimation.fillMode = .forwards 42 | pathAnimation.isRemovedOnCompletion = false 43 | 44 | let fadeOutAnimation = BasicAnimation(keyPath: .opacity) 45 | fadeOutAnimation.fromValue = 1 46 | fadeOutAnimation.toValue = 0 47 | fadeOutAnimation.duration = 1 48 | fadeOutAnimation.beginTime = 2 49 | 50 | let animationGroup = AnimationGroup() 51 | animationGroup.duration = pathAnimation.duration + fadeOutAnimation.duration 52 | animationGroup.repeatCount = .infinity 53 | animationGroup.animations = [pathAnimation, fadeOutAnimation] 54 | animationGroup.fillMode = .forwards 55 | animationGroup.isRemovedOnCompletion = false 56 | 57 | animationGroup.setAnimationDidStart { 58 | print("animation did start") 59 | } 60 | 61 | let canceller = animationGroup.animate(in: circleLayer) 62 | 63 | animationGroup.setAnimationDidStop { finished in 64 | print("animation did stop: finished = \(finished)") 65 | } 66 | 67 | DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(7)) { 68 | canceller.cancelAnimation() 69 | } 70 | } 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Example/TheAnimationExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0746D5FE20B5C14C00D21053 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0746D5FD20B5C14C00D21053 /* AppDelegate.swift */; }; 11 | 0746D60020B5C14C00D21053 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0746D5FF20B5C14C00D21053 /* ViewController.swift */; }; 12 | 0746D60220B5C14D00D21053 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0746D60120B5C14D00D21053 /* Assets.xcassets */; }; 13 | 0746D60520B5C14D00D21053 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0746D60320B5C14D00D21053 /* Main.storyboard */; }; 14 | 07EB621020B5D7BB00943B5A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07EB620F20B5D7BB00943B5A /* AppDelegate.swift */; }; 15 | 07EB621220B5D7BB00943B5A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07EB621120B5D7BB00943B5A /* ViewController.swift */; }; 16 | 07EB621520B5D7BB00943B5A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 07EB621320B5D7BB00943B5A /* Main.storyboard */; }; 17 | 07EB621720B5D7BD00943B5A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 07EB621620B5D7BD00943B5A /* Assets.xcassets */; }; 18 | 07EB623820B5DB9F00943B5A /* TheAnimation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07EB623720B5DB9F00943B5A /* TheAnimation.framework */; }; 19 | 07EB625220B5E6F100943B5A /* TheAnimation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07EB625120B5E6F100943B5A /* TheAnimation.framework */; }; 20 | 3724DDD520A6CA3200584B56 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3724DDD420A6CA3200584B56 /* AppDelegate.swift */; }; 21 | 3724DDD720A6CA3200584B56 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3724DDD620A6CA3200584B56 /* ViewController.swift */; }; 22 | 3724DDDA20A6CA3200584B56 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3724DDD820A6CA3200584B56 /* Main.storyboard */; }; 23 | 3724DDDC20A6CA3300584B56 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3724DDDB20A6CA3300584B56 /* Assets.xcassets */; }; 24 | 3724DDDF20A6CA3300584B56 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3724DDDD20A6CA3300584B56 /* LaunchScreen.storyboard */; }; 25 | 375095EE20A6CA93004A5EDC /* TheAnimation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 375095ED20A6CA93004A5EDC /* TheAnimation.framework */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 0746D5FB20B5C14C00D21053 /* TheAnimationExample-macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TheAnimationExample-macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 0746D5FD20B5C14C00D21053 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 31 | 0746D5FF20B5C14C00D21053 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 32 | 0746D60120B5C14D00D21053 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 33 | 0746D60420B5C14D00D21053 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 34 | 0746D60620B5C14D00D21053 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 0746D60720B5C14D00D21053 /* TheAnimationExample_macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TheAnimationExample_macOS.entitlements; sourceTree = ""; }; 36 | 07EB620D20B5D7BB00943B5A /* TheAnimationExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TheAnimationExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 07EB620F20B5D7BB00943B5A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 38 | 07EB621120B5D7BB00943B5A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 39 | 07EB621420B5D7BB00943B5A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 07EB621620B5D7BD00943B5A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 41 | 07EB621820B5D7BD00943B5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | 07EB623520B5D95A00943B5A /* TheAnimation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TheAnimation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 07EB623720B5DB9F00943B5A /* TheAnimation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TheAnimation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 07EB625120B5E6F100943B5A /* TheAnimation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TheAnimation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 3724DDD120A6CA3200584B56 /* TheAnimationExample-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TheAnimationExample-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 3724DDD420A6CA3200584B56 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 47 | 3724DDD620A6CA3200584B56 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 48 | 3724DDD920A6CA3200584B56 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | 3724DDDB20A6CA3300584B56 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | 3724DDDE20A6CA3300584B56 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 3724DDE020A6CA3300584B56 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 375095ED20A6CA93004A5EDC /* TheAnimation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TheAnimation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 0746D5F820B5C14C00D21053 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 07EB625220B5E6F100943B5A /* TheAnimation.framework in Frameworks */, 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | 07EB620A20B5D7BB00943B5A /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 07EB623820B5DB9F00943B5A /* TheAnimation.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | 3724DDCE20A6CA3200584B56 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | 375095EE20A6CA93004A5EDC /* TheAnimation.framework in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | 0746D5FC20B5C14C00D21053 /* TheAnimationExample-macOS */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 0746D5FD20B5C14C00D21053 /* AppDelegate.swift */, 87 | 0746D5FF20B5C14C00D21053 /* ViewController.swift */, 88 | 0746D60120B5C14D00D21053 /* Assets.xcassets */, 89 | 0746D60320B5C14D00D21053 /* Main.storyboard */, 90 | 0746D60620B5C14D00D21053 /* Info.plist */, 91 | 0746D60720B5C14D00D21053 /* TheAnimationExample_macOS.entitlements */, 92 | ); 93 | path = "TheAnimationExample-macOS"; 94 | sourceTree = ""; 95 | }; 96 | 07EB620E20B5D7BB00943B5A /* TheAnimationExample-tvOS */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 07EB620F20B5D7BB00943B5A /* AppDelegate.swift */, 100 | 07EB621120B5D7BB00943B5A /* ViewController.swift */, 101 | 07EB621320B5D7BB00943B5A /* Main.storyboard */, 102 | 07EB621620B5D7BD00943B5A /* Assets.xcassets */, 103 | 07EB621820B5D7BD00943B5A /* Info.plist */, 104 | ); 105 | path = "TheAnimationExample-tvOS"; 106 | sourceTree = ""; 107 | }; 108 | 3724DDC820A6CA3200584B56 = { 109 | isa = PBXGroup; 110 | children = ( 111 | 3724DDD320A6CA3200584B56 /* TheAnimationExample-iOS */, 112 | 0746D5FC20B5C14C00D21053 /* TheAnimationExample-macOS */, 113 | 07EB620E20B5D7BB00943B5A /* TheAnimationExample-tvOS */, 114 | 3724DDD220A6CA3200584B56 /* Products */, 115 | 375095EC20A6CA93004A5EDC /* Frameworks */, 116 | ); 117 | sourceTree = ""; 118 | }; 119 | 3724DDD220A6CA3200584B56 /* Products */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 3724DDD120A6CA3200584B56 /* TheAnimationExample-iOS.app */, 123 | 0746D5FB20B5C14C00D21053 /* TheAnimationExample-macOS.app */, 124 | 07EB620D20B5D7BB00943B5A /* TheAnimationExample-tvOS.app */, 125 | ); 126 | name = Products; 127 | sourceTree = ""; 128 | }; 129 | 3724DDD320A6CA3200584B56 /* TheAnimationExample-iOS */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 3724DDD420A6CA3200584B56 /* AppDelegate.swift */, 133 | 3724DDD620A6CA3200584B56 /* ViewController.swift */, 134 | 3724DDD820A6CA3200584B56 /* Main.storyboard */, 135 | 3724DDDB20A6CA3300584B56 /* Assets.xcassets */, 136 | 3724DDDD20A6CA3300584B56 /* LaunchScreen.storyboard */, 137 | 3724DDE020A6CA3300584B56 /* Info.plist */, 138 | ); 139 | path = "TheAnimationExample-iOS"; 140 | sourceTree = ""; 141 | }; 142 | 375095EC20A6CA93004A5EDC /* Frameworks */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 07EB625120B5E6F100943B5A /* TheAnimation.framework */, 146 | 07EB623720B5DB9F00943B5A /* TheAnimation.framework */, 147 | 07EB623520B5D95A00943B5A /* TheAnimation.framework */, 148 | 375095ED20A6CA93004A5EDC /* TheAnimation.framework */, 149 | ); 150 | name = Frameworks; 151 | sourceTree = ""; 152 | }; 153 | /* End PBXGroup section */ 154 | 155 | /* Begin PBXNativeTarget section */ 156 | 0746D5FA20B5C14C00D21053 /* TheAnimationExample-macOS */ = { 157 | isa = PBXNativeTarget; 158 | buildConfigurationList = 0746D60820B5C14D00D21053 /* Build configuration list for PBXNativeTarget "TheAnimationExample-macOS" */; 159 | buildPhases = ( 160 | 0746D5F720B5C14C00D21053 /* Sources */, 161 | 0746D5F820B5C14C00D21053 /* Frameworks */, 162 | 0746D5F920B5C14C00D21053 /* Resources */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ); 168 | name = "TheAnimationExample-macOS"; 169 | productName = "TheAnimationExample-macOS"; 170 | productReference = 0746D5FB20B5C14C00D21053 /* TheAnimationExample-macOS.app */; 171 | productType = "com.apple.product-type.application"; 172 | }; 173 | 07EB620C20B5D7BB00943B5A /* TheAnimationExample-tvOS */ = { 174 | isa = PBXNativeTarget; 175 | buildConfigurationList = 07EB621B20B5D7BD00943B5A /* Build configuration list for PBXNativeTarget "TheAnimationExample-tvOS" */; 176 | buildPhases = ( 177 | 07EB620920B5D7BB00943B5A /* Sources */, 178 | 07EB620A20B5D7BB00943B5A /* Frameworks */, 179 | 07EB620B20B5D7BB00943B5A /* Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | ); 185 | name = "TheAnimationExample-tvOS"; 186 | productName = "TheAnimationExample-tvOS"; 187 | productReference = 07EB620D20B5D7BB00943B5A /* TheAnimationExample-tvOS.app */; 188 | productType = "com.apple.product-type.application"; 189 | }; 190 | 3724DDD020A6CA3200584B56 /* TheAnimationExample-iOS */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = 3724DDE320A6CA3300584B56 /* Build configuration list for PBXNativeTarget "TheAnimationExample-iOS" */; 193 | buildPhases = ( 194 | 3724DDCD20A6CA3200584B56 /* Sources */, 195 | 3724DDCE20A6CA3200584B56 /* Frameworks */, 196 | 3724DDCF20A6CA3200584B56 /* Resources */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | ); 202 | name = "TheAnimationExample-iOS"; 203 | productName = TheAnimationExample; 204 | productReference = 3724DDD120A6CA3200584B56 /* TheAnimationExample-iOS.app */; 205 | productType = "com.apple.product-type.application"; 206 | }; 207 | /* End PBXNativeTarget section */ 208 | 209 | /* Begin PBXProject section */ 210 | 3724DDC920A6CA3200584B56 /* Project object */ = { 211 | isa = PBXProject; 212 | attributes = { 213 | LastSwiftUpdateCheck = 0930; 214 | LastUpgradeCheck = 0930; 215 | ORGANIZATIONNAME = "marty-suzuki"; 216 | TargetAttributes = { 217 | 0746D5FA20B5C14C00D21053 = { 218 | CreatedOnToolsVersion = 9.3.1; 219 | }; 220 | 07EB620C20B5D7BB00943B5A = { 221 | CreatedOnToolsVersion = 9.3.1; 222 | }; 223 | 3724DDD020A6CA3200584B56 = { 224 | CreatedOnToolsVersion = 9.3; 225 | LastSwiftMigration = 1000; 226 | }; 227 | }; 228 | }; 229 | buildConfigurationList = 3724DDCC20A6CA3200584B56 /* Build configuration list for PBXProject "TheAnimationExample" */; 230 | compatibilityVersion = "Xcode 9.3"; 231 | developmentRegion = en; 232 | hasScannedForEncodings = 0; 233 | knownRegions = ( 234 | en, 235 | Base, 236 | ); 237 | mainGroup = 3724DDC820A6CA3200584B56; 238 | productRefGroup = 3724DDD220A6CA3200584B56 /* Products */; 239 | projectDirPath = ""; 240 | projectRoot = ""; 241 | targets = ( 242 | 3724DDD020A6CA3200584B56 /* TheAnimationExample-iOS */, 243 | 0746D5FA20B5C14C00D21053 /* TheAnimationExample-macOS */, 244 | 07EB620C20B5D7BB00943B5A /* TheAnimationExample-tvOS */, 245 | ); 246 | }; 247 | /* End PBXProject section */ 248 | 249 | /* Begin PBXResourcesBuildPhase section */ 250 | 0746D5F920B5C14C00D21053 /* Resources */ = { 251 | isa = PBXResourcesBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | 0746D60220B5C14D00D21053 /* Assets.xcassets in Resources */, 255 | 0746D60520B5C14D00D21053 /* Main.storyboard in Resources */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | 07EB620B20B5D7BB00943B5A /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 07EB621720B5D7BD00943B5A /* Assets.xcassets in Resources */, 264 | 07EB621520B5D7BB00943B5A /* Main.storyboard in Resources */, 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | 3724DDCF20A6CA3200584B56 /* Resources */ = { 269 | isa = PBXResourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | 3724DDDF20A6CA3300584B56 /* LaunchScreen.storyboard in Resources */, 273 | 3724DDDC20A6CA3300584B56 /* Assets.xcassets in Resources */, 274 | 3724DDDA20A6CA3200584B56 /* Main.storyboard in Resources */, 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | /* End PBXResourcesBuildPhase section */ 279 | 280 | /* Begin PBXSourcesBuildPhase section */ 281 | 0746D5F720B5C14C00D21053 /* Sources */ = { 282 | isa = PBXSourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | 0746D60020B5C14C00D21053 /* ViewController.swift in Sources */, 286 | 0746D5FE20B5C14C00D21053 /* AppDelegate.swift in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 07EB620920B5D7BB00943B5A /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 07EB621220B5D7BB00943B5A /* ViewController.swift in Sources */, 295 | 07EB621020B5D7BB00943B5A /* AppDelegate.swift in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | 3724DDCD20A6CA3200584B56 /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | 3724DDD720A6CA3200584B56 /* ViewController.swift in Sources */, 304 | 3724DDD520A6CA3200584B56 /* AppDelegate.swift in Sources */, 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | /* End PBXSourcesBuildPhase section */ 309 | 310 | /* Begin PBXVariantGroup section */ 311 | 0746D60320B5C14D00D21053 /* Main.storyboard */ = { 312 | isa = PBXVariantGroup; 313 | children = ( 314 | 0746D60420B5C14D00D21053 /* Base */, 315 | ); 316 | name = Main.storyboard; 317 | sourceTree = ""; 318 | }; 319 | 07EB621320B5D7BB00943B5A /* Main.storyboard */ = { 320 | isa = PBXVariantGroup; 321 | children = ( 322 | 07EB621420B5D7BB00943B5A /* Base */, 323 | ); 324 | name = Main.storyboard; 325 | sourceTree = ""; 326 | }; 327 | 3724DDD820A6CA3200584B56 /* Main.storyboard */ = { 328 | isa = PBXVariantGroup; 329 | children = ( 330 | 3724DDD920A6CA3200584B56 /* Base */, 331 | ); 332 | name = Main.storyboard; 333 | sourceTree = ""; 334 | }; 335 | 3724DDDD20A6CA3300584B56 /* LaunchScreen.storyboard */ = { 336 | isa = PBXVariantGroup; 337 | children = ( 338 | 3724DDDE20A6CA3300584B56 /* Base */, 339 | ); 340 | name = LaunchScreen.storyboard; 341 | sourceTree = ""; 342 | }; 343 | /* End PBXVariantGroup section */ 344 | 345 | /* Begin XCBuildConfiguration section */ 346 | 0746D60920B5C14D00D21053 /* Debug */ = { 347 | isa = XCBuildConfiguration; 348 | buildSettings = { 349 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 350 | CODE_SIGN_ENTITLEMENTS = "TheAnimationExample-macOS/TheAnimationExample_macOS.entitlements"; 351 | CODE_SIGN_IDENTITY = "Mac Developer"; 352 | CODE_SIGN_STYLE = Automatic; 353 | COMBINE_HIDPI_IMAGES = YES; 354 | DEVELOPMENT_TEAM = 2V65Z4JB29; 355 | INFOPLIST_FILE = "TheAnimationExample-macOS/Info.plist"; 356 | LD_RUNPATH_SEARCH_PATHS = ( 357 | "$(inherited)", 358 | "@executable_path/../Frameworks", 359 | ); 360 | MACOSX_DEPLOYMENT_TARGET = 10.11; 361 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationExample-macOS"; 362 | PRODUCT_NAME = "$(TARGET_NAME)"; 363 | SDKROOT = macosx; 364 | SWIFT_VERSION = 4.0; 365 | }; 366 | name = Debug; 367 | }; 368 | 0746D60A20B5C14D00D21053 /* Release */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | CODE_SIGN_ENTITLEMENTS = "TheAnimationExample-macOS/TheAnimationExample_macOS.entitlements"; 373 | CODE_SIGN_IDENTITY = "Mac Developer"; 374 | CODE_SIGN_STYLE = Automatic; 375 | COMBINE_HIDPI_IMAGES = YES; 376 | DEVELOPMENT_TEAM = 2V65Z4JB29; 377 | INFOPLIST_FILE = "TheAnimationExample-macOS/Info.plist"; 378 | LD_RUNPATH_SEARCH_PATHS = ( 379 | "$(inherited)", 380 | "@executable_path/../Frameworks", 381 | ); 382 | MACOSX_DEPLOYMENT_TARGET = 10.11; 383 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationExample-macOS"; 384 | PRODUCT_NAME = "$(TARGET_NAME)"; 385 | SDKROOT = macosx; 386 | SWIFT_VERSION = 4.0; 387 | }; 388 | name = Release; 389 | }; 390 | 07EB621920B5D7BD00943B5A /* Debug */ = { 391 | isa = XCBuildConfiguration; 392 | buildSettings = { 393 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 394 | CODE_SIGN_STYLE = Automatic; 395 | DEVELOPMENT_TEAM = 2V65Z4JB29; 396 | INFOPLIST_FILE = "TheAnimationExample-tvOS/Info.plist"; 397 | LD_RUNPATH_SEARCH_PATHS = ( 398 | "$(inherited)", 399 | "@executable_path/Frameworks", 400 | ); 401 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationExample-tvOS"; 402 | PRODUCT_NAME = "$(TARGET_NAME)"; 403 | SDKROOT = appletvos; 404 | SWIFT_VERSION = 4.0; 405 | TARGETED_DEVICE_FAMILY = 3; 406 | TVOS_DEPLOYMENT_TARGET = 11.3; 407 | }; 408 | name = Debug; 409 | }; 410 | 07EB621A20B5D7BD00943B5A /* Release */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 414 | CODE_SIGN_STYLE = Automatic; 415 | DEVELOPMENT_TEAM = 2V65Z4JB29; 416 | INFOPLIST_FILE = "TheAnimationExample-tvOS/Info.plist"; 417 | LD_RUNPATH_SEARCH_PATHS = ( 418 | "$(inherited)", 419 | "@executable_path/Frameworks", 420 | ); 421 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationExample-tvOS"; 422 | PRODUCT_NAME = "$(TARGET_NAME)"; 423 | SDKROOT = appletvos; 424 | SWIFT_VERSION = 4.0; 425 | TARGETED_DEVICE_FAMILY = 3; 426 | TVOS_DEPLOYMENT_TARGET = 11.3; 427 | }; 428 | name = Release; 429 | }; 430 | 3724DDE120A6CA3300584B56 /* Debug */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ALWAYS_SEARCH_USER_PATHS = NO; 434 | CLANG_ANALYZER_NONNULL = YES; 435 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 436 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 437 | CLANG_CXX_LIBRARY = "libc++"; 438 | CLANG_ENABLE_MODULES = YES; 439 | CLANG_ENABLE_OBJC_ARC = YES; 440 | CLANG_ENABLE_OBJC_WEAK = YES; 441 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 442 | CLANG_WARN_BOOL_CONVERSION = YES; 443 | CLANG_WARN_COMMA = YES; 444 | CLANG_WARN_CONSTANT_CONVERSION = YES; 445 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 446 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 447 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 448 | CLANG_WARN_EMPTY_BODY = YES; 449 | CLANG_WARN_ENUM_CONVERSION = YES; 450 | CLANG_WARN_INFINITE_RECURSION = YES; 451 | CLANG_WARN_INT_CONVERSION = YES; 452 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 453 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 454 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 455 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 456 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 457 | CLANG_WARN_STRICT_PROTOTYPES = YES; 458 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 459 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 460 | CLANG_WARN_UNREACHABLE_CODE = YES; 461 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 462 | CODE_SIGN_IDENTITY = "iPhone Developer"; 463 | COPY_PHASE_STRIP = NO; 464 | DEBUG_INFORMATION_FORMAT = dwarf; 465 | ENABLE_STRICT_OBJC_MSGSEND = YES; 466 | ENABLE_TESTABILITY = YES; 467 | GCC_C_LANGUAGE_STANDARD = gnu11; 468 | GCC_DYNAMIC_NO_PIC = NO; 469 | GCC_NO_COMMON_BLOCKS = YES; 470 | GCC_OPTIMIZATION_LEVEL = 0; 471 | GCC_PREPROCESSOR_DEFINITIONS = ( 472 | "DEBUG=1", 473 | "$(inherited)", 474 | ); 475 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 476 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 477 | GCC_WARN_UNDECLARED_SELECTOR = YES; 478 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 479 | GCC_WARN_UNUSED_FUNCTION = YES; 480 | GCC_WARN_UNUSED_VARIABLE = YES; 481 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 482 | MTL_ENABLE_DEBUG_INFO = YES; 483 | ONLY_ACTIVE_ARCH = YES; 484 | SDKROOT = iphoneos; 485 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 486 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 487 | }; 488 | name = Debug; 489 | }; 490 | 3724DDE220A6CA3300584B56 /* Release */ = { 491 | isa = XCBuildConfiguration; 492 | buildSettings = { 493 | ALWAYS_SEARCH_USER_PATHS = NO; 494 | CLANG_ANALYZER_NONNULL = YES; 495 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 496 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 497 | CLANG_CXX_LIBRARY = "libc++"; 498 | CLANG_ENABLE_MODULES = YES; 499 | CLANG_ENABLE_OBJC_ARC = YES; 500 | CLANG_ENABLE_OBJC_WEAK = YES; 501 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 502 | CLANG_WARN_BOOL_CONVERSION = YES; 503 | CLANG_WARN_COMMA = YES; 504 | CLANG_WARN_CONSTANT_CONVERSION = YES; 505 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 506 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 507 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 508 | CLANG_WARN_EMPTY_BODY = YES; 509 | CLANG_WARN_ENUM_CONVERSION = YES; 510 | CLANG_WARN_INFINITE_RECURSION = YES; 511 | CLANG_WARN_INT_CONVERSION = YES; 512 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 513 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 514 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 515 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 516 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 517 | CLANG_WARN_STRICT_PROTOTYPES = YES; 518 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 519 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 520 | CLANG_WARN_UNREACHABLE_CODE = YES; 521 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 522 | CODE_SIGN_IDENTITY = "iPhone Developer"; 523 | COPY_PHASE_STRIP = NO; 524 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 525 | ENABLE_NS_ASSERTIONS = NO; 526 | ENABLE_STRICT_OBJC_MSGSEND = YES; 527 | GCC_C_LANGUAGE_STANDARD = gnu11; 528 | GCC_NO_COMMON_BLOCKS = YES; 529 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 530 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 531 | GCC_WARN_UNDECLARED_SELECTOR = YES; 532 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 533 | GCC_WARN_UNUSED_FUNCTION = YES; 534 | GCC_WARN_UNUSED_VARIABLE = YES; 535 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 536 | MTL_ENABLE_DEBUG_INFO = NO; 537 | SDKROOT = iphoneos; 538 | SWIFT_COMPILATION_MODE = wholemodule; 539 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 540 | VALIDATE_PRODUCT = YES; 541 | }; 542 | name = Release; 543 | }; 544 | 3724DDE420A6CA3300584B56 /* Debug */ = { 545 | isa = XCBuildConfiguration; 546 | buildSettings = { 547 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 548 | CODE_SIGN_STYLE = Automatic; 549 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimationExample-iOS/Info.plist"; 550 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 551 | LD_RUNPATH_SEARCH_PATHS = ( 552 | "$(inherited)", 553 | "@executable_path/Frameworks", 554 | ); 555 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationExample-iOS"; 556 | PRODUCT_NAME = "$(TARGET_NAME)"; 557 | SWIFT_VERSION = 4.2; 558 | TARGETED_DEVICE_FAMILY = "1,2"; 559 | }; 560 | name = Debug; 561 | }; 562 | 3724DDE520A6CA3300584B56 /* Release */ = { 563 | isa = XCBuildConfiguration; 564 | buildSettings = { 565 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 566 | CODE_SIGN_STYLE = Automatic; 567 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimationExample-iOS/Info.plist"; 568 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 569 | LD_RUNPATH_SEARCH_PATHS = ( 570 | "$(inherited)", 571 | "@executable_path/Frameworks", 572 | ); 573 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationExample-iOS"; 574 | PRODUCT_NAME = "$(TARGET_NAME)"; 575 | SWIFT_VERSION = 4.2; 576 | TARGETED_DEVICE_FAMILY = "1,2"; 577 | }; 578 | name = Release; 579 | }; 580 | /* End XCBuildConfiguration section */ 581 | 582 | /* Begin XCConfigurationList section */ 583 | 0746D60820B5C14D00D21053 /* Build configuration list for PBXNativeTarget "TheAnimationExample-macOS" */ = { 584 | isa = XCConfigurationList; 585 | buildConfigurations = ( 586 | 0746D60920B5C14D00D21053 /* Debug */, 587 | 0746D60A20B5C14D00D21053 /* Release */, 588 | ); 589 | defaultConfigurationIsVisible = 0; 590 | defaultConfigurationName = Release; 591 | }; 592 | 07EB621B20B5D7BD00943B5A /* Build configuration list for PBXNativeTarget "TheAnimationExample-tvOS" */ = { 593 | isa = XCConfigurationList; 594 | buildConfigurations = ( 595 | 07EB621920B5D7BD00943B5A /* Debug */, 596 | 07EB621A20B5D7BD00943B5A /* Release */, 597 | ); 598 | defaultConfigurationIsVisible = 0; 599 | defaultConfigurationName = Release; 600 | }; 601 | 3724DDCC20A6CA3200584B56 /* Build configuration list for PBXProject "TheAnimationExample" */ = { 602 | isa = XCConfigurationList; 603 | buildConfigurations = ( 604 | 3724DDE120A6CA3300584B56 /* Debug */, 605 | 3724DDE220A6CA3300584B56 /* Release */, 606 | ); 607 | defaultConfigurationIsVisible = 0; 608 | defaultConfigurationName = Release; 609 | }; 610 | 3724DDE320A6CA3300584B56 /* Build configuration list for PBXNativeTarget "TheAnimationExample-iOS" */ = { 611 | isa = XCConfigurationList; 612 | buildConfigurations = ( 613 | 3724DDE420A6CA3300584B56 /* Debug */, 614 | 3724DDE520A6CA3300584B56 /* Release */, 615 | ); 616 | defaultConfigurationIsVisible = 0; 617 | defaultConfigurationName = Release; 618 | }; 619 | /* End XCConfigurationList section */ 620 | }; 621 | rootObject = 3724DDC920A6CA3200584B56 /* Project object */; 622 | } 623 | -------------------------------------------------------------------------------- /Example/TheAnimationExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/TheAnimationExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/TheAnimationExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/TheAnimationExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marty-suzuki/TheAnimation/44bb115e8633d2d3a31c4573ecc095d7268935e5/Images/background.png -------------------------------------------------------------------------------- /Images/background_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marty-suzuki/TheAnimation/44bb115e8633d2d3a31c4573ecc095d7268935e5/Images/background_raw.png -------------------------------------------------------------------------------- /Images/basic_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marty-suzuki/TheAnimation/44bb115e8633d2d3a31c4573ecc095d7268935e5/Images/basic_animation.png -------------------------------------------------------------------------------- /Images/opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marty-suzuki/TheAnimation/44bb115e8633d2d3a31c4573ecc095d7268935e5/Images/opacity.png -------------------------------------------------------------------------------- /Images/opacity_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marty-suzuki/TheAnimation/44bb115e8633d2d3a31c4573ecc095d7268935e5/Images/opacity_raw.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 marty-suzuki 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TheAnimation 2 | 3 |

4 | Platform 5 | 6 | Language 7 | 8 | 9 | Carthage 10 | 11 | 12 | Version 13 | 14 | 15 | License 16 | 17 | 18 | CI Status 19 | 20 |

21 | 22 | TheAnimation is Type-safe CAAnimation wrapper. 23 | 24 | ![](./Images/basic_animation.png) 25 | 26 | ## Introduction 27 | 28 | For example, if you want to animate `backgroundColor` with `CABasicAnimation`, you need to consider type because fromValue property and so on are `Any?`. 29 | 30 | ![](./Images/background_raw.png) 31 | 32 | If you use `BasicAnimation of TheAnimation`, you can animate `backgroundColor` without considering type! (`AnimationKeyPaths.backgroundColor` is `AnimationKeyPath` type.) 33 | 34 | ![](./Images/background.png) 35 | 36 | ## Usage 37 | 38 | The way of making an animation is almost similar `CAAnimation`. 39 | But you need to use `animation.animate(in:)` method instead of using `layer.add(_:forKey:)`. 40 | 41 | ```swift 42 | let view = UIView() 43 | 44 | let animation = BasicAnimation(keyPath: .opacity) 45 | animation.fromValue = 0 46 | animation.toValue = 1 47 | animation.duration = 1 48 | animation.animate(in: view) 49 | ``` 50 | 51 | `animation.animate(in:)` returns `AnimaitonCanceller`. You can cancel an animation with it. 52 | 53 | ```swift 54 | let canceller = animation.animate(in: view) 55 | canceller.cancelAnimation() 56 | ``` 57 | 58 | ## Example 59 | 60 | To run the example project, clone the repo, and open Example directory. 61 | 62 | ## Correspondence Table 63 | 64 | | CAAnimation | TheAnimation | 65 | | :-: | :-: | 66 | | CAPropertyAnimation | PropertyAnimation | 67 | | CABasicAnimation | BasicAnimation | 68 | | CAKeyframeAnimation | KeyframeAnimation | 69 | | CASpringAnimation | SpringAnimation | 70 | | CATransition | TransitionAnimation | 71 | | CAAnimationGroup | AnimationGroup | 72 | 73 | ## Add new `AnimationKeyPath` 74 | 75 | You can add `AnimationKeyPath` like this. 76 | 77 | ```swift 78 | extension AnimationKeyPaths { 79 | static let newKeyPath = AnimationKeyPath(keyPath: "abcd") 80 | } 81 | ``` 82 | 83 | ## Handle animation did `Start` / `Stop` 84 | 85 | You can handle animation did **Start** with `func setAnimationDidStart(handler:)`. 86 | In addition, you can handle animation did **Stop** with `func setAnimationDidStop(handler:)`. 87 | 88 | ```swift 89 | let view = UIView() 90 | 91 | let animation = BasicAnimation(keyPath: .opacity) 92 | animation.fromValue = 0 93 | animation.toValue = 1 94 | animation.duration = 1 95 | 96 | animation.setAnimationDidStart { 97 | // do something 98 | } 99 | 100 | animation.setAnimationDidStop { finished in 101 | // do something 102 | } 103 | 104 | animation.animate(in: view) 105 | ``` 106 | 107 | ## Requirements 108 | 109 | - Xcode 9.3 110 | - iOS 9 or greater 111 | - tvOS 9 or greater 112 | - macOS 10.11 or greater 113 | - Swift 4.2 (since 0.3.0) 114 | 115 | ## Installation 116 | 117 | ### Carthage 118 | 119 | If you’re using [Carthage](https://github.com/Carthage/Carthage), simply add 120 | TheAnimation to your `Cartfile`: 121 | 122 | ```ruby 123 | github "marty-suzuki/TheAnimation" 124 | ``` 125 | 126 | ### CocoaPods 127 | 128 | TheAnimation is available through [CocoaPods](https://cocoapods.org). To install 129 | it, simply add the following line to your Podfile: 130 | 131 | ```ruby 132 | pod 'TheAnimation' 133 | ``` 134 | 135 | ## Author 136 | 137 | marty-suzuki, s1180183@gmail.com 138 | 139 | ## License 140 | 141 | TheAnimation is available under the MIT license. See the LICENSE file for more info. 142 | -------------------------------------------------------------------------------- /TheAnimation.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint TheAnimation.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'TheAnimation' 11 | s.version = '0.4.0' 12 | s.summary = 'Type safe CAAnimation wrapper.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | # s.description = <<-DESC 21 | # TODO: Add long description of the pod here. 22 | # DESC 23 | 24 | s.homepage = 'https://github.com/marty-suzuki/TheAnimation' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'marty-suzuki' => 's1180183@gmail.com' } 28 | s.source = { :git => 'https://github.com/marty-suzuki/TheAnimation.git', :tag => s.version.to_s } 29 | s.social_media_url = 'https://twitter.com/marty_suzuki' 30 | 31 | s.ios.deployment_target = '9.0' 32 | s.osx.deployment_target = '10.11' 33 | s.tvos.deployment_target = '9.0' 34 | 35 | s.source_files = 'TheAnimation/**/*.{swift}' 36 | end 37 | -------------------------------------------------------------------------------- /TheAnimation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 07239C2E20B733490016F553 /* Animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2320B733490016F553 /* Animation.swift */; }; 11 | 07239C2F20B733490016F553 /* Animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2320B733490016F553 /* Animation.swift */; }; 12 | 07239C3020B733490016F553 /* Animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2320B733490016F553 /* Animation.swift */; }; 13 | 07239C3120B733490016F553 /* TransitionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2420B733490016F553 /* TransitionAnimation.swift */; }; 14 | 07239C3220B733490016F553 /* TransitionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2420B733490016F553 /* TransitionAnimation.swift */; }; 15 | 07239C3320B733490016F553 /* TransitionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2420B733490016F553 /* TransitionAnimation.swift */; }; 16 | 07239C3420B733490016F553 /* PrimitiveAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2520B733490016F553 /* PrimitiveAnimation.swift */; }; 17 | 07239C3520B733490016F553 /* PrimitiveAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2520B733490016F553 /* PrimitiveAnimation.swift */; }; 18 | 07239C3620B733490016F553 /* PrimitiveAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2520B733490016F553 /* PrimitiveAnimation.swift */; }; 19 | 07239C3720B733490016F553 /* AnyAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2620B733490016F553 /* AnyAnimation.swift */; }; 20 | 07239C3820B733490016F553 /* AnyAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2620B733490016F553 /* AnyAnimation.swift */; }; 21 | 07239C3920B733490016F553 /* AnyAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2620B733490016F553 /* AnyAnimation.swift */; }; 22 | 07239C3A20B733490016F553 /* AnimationGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2720B733490016F553 /* AnimationGroup.swift */; }; 23 | 07239C3B20B733490016F553 /* AnimationGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2720B733490016F553 /* AnimationGroup.swift */; }; 24 | 07239C3C20B733490016F553 /* AnimationGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2720B733490016F553 /* AnimationGroup.swift */; }; 25 | 07239C3D20B733490016F553 /* PropertyAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2820B733490016F553 /* PropertyAnimation.swift */; }; 26 | 07239C3E20B733490016F553 /* PropertyAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2820B733490016F553 /* PropertyAnimation.swift */; }; 27 | 07239C3F20B733490016F553 /* PropertyAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2820B733490016F553 /* PropertyAnimation.swift */; }; 28 | 07239C4020B733490016F553 /* BasicAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2920B733490016F553 /* BasicAnimation.swift */; }; 29 | 07239C4120B733490016F553 /* BasicAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2920B733490016F553 /* BasicAnimation.swift */; }; 30 | 07239C4220B733490016F553 /* BasicAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2920B733490016F553 /* BasicAnimation.swift */; }; 31 | 07239C4320B733490016F553 /* SpringAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2A20B733490016F553 /* SpringAnimation.swift */; }; 32 | 07239C4420B733490016F553 /* SpringAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2A20B733490016F553 /* SpringAnimation.swift */; }; 33 | 07239C4520B733490016F553 /* SpringAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2A20B733490016F553 /* SpringAnimation.swift */; }; 34 | 07239C4620B733490016F553 /* AnimationKeyPaths.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2B20B733490016F553 /* AnimationKeyPaths.swift */; }; 35 | 07239C4720B733490016F553 /* AnimationKeyPaths.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2B20B733490016F553 /* AnimationKeyPaths.swift */; }; 36 | 07239C4820B733490016F553 /* AnimationKeyPaths.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2B20B733490016F553 /* AnimationKeyPaths.swift */; }; 37 | 07239C4920B733490016F553 /* TimingFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2C20B733490016F553 /* TimingFunction.swift */; }; 38 | 07239C4A20B733490016F553 /* TimingFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2C20B733490016F553 /* TimingFunction.swift */; }; 39 | 07239C4B20B733490016F553 /* TimingFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2C20B733490016F553 /* TimingFunction.swift */; }; 40 | 07239C4C20B733490016F553 /* KeyframeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2D20B733490016F553 /* KeyframeAnimation.swift */; }; 41 | 07239C4D20B733490016F553 /* KeyframeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2D20B733490016F553 /* KeyframeAnimation.swift */; }; 42 | 07239C4E20B733490016F553 /* KeyframeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07239C2D20B733490016F553 /* KeyframeAnimation.swift */; }; 43 | 37BD75A220A5D050009219F2 /* TheAnimation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37BD759820A5D050009219F2 /* TheAnimation.framework */; }; 44 | 37BD75A720A5D050009219F2 /* TheAnimationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BD75A620A5D050009219F2 /* TheAnimationTests.swift */; }; 45 | 9D00EA3F20E9F30D00D820FE /* TheAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D00EA3E20E9F30D00D820FE /* TheAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 46 | 9D00EA4420E9F31E00D820FE /* TheAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D00EA3E20E9F30D00D820FE /* TheAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 47 | 9D00EA4520E9F31F00D820FE /* TheAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D00EA3E20E9F30D00D820FE /* TheAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 48 | EDECABFE23D5FD7900B37022 /* CAAnimationDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDECABFD23D5FD7900B37022 /* CAAnimationDelegateProxy.swift */; }; 49 | EDECABFF23D5FD7900B37022 /* CAAnimationDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDECABFD23D5FD7900B37022 /* CAAnimationDelegateProxy.swift */; }; 50 | EDECAC0023D5FD7900B37022 /* CAAnimationDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDECABFD23D5FD7900B37022 /* CAAnimationDelegateProxy.swift */; }; 51 | /* End PBXBuildFile section */ 52 | 53 | /* Begin PBXContainerItemProxy section */ 54 | 37BD75A320A5D050009219F2 /* PBXContainerItemProxy */ = { 55 | isa = PBXContainerItemProxy; 56 | containerPortal = 37BD758F20A5D050009219F2 /* Project object */; 57 | proxyType = 1; 58 | remoteGlobalIDString = 37BD759720A5D050009219F2; 59 | remoteInfo = TheAnimation; 60 | }; 61 | /* End PBXContainerItemProxy section */ 62 | 63 | /* Begin PBXFileReference section */ 64 | 07239C2320B733490016F553 /* Animation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Animation.swift; sourceTree = ""; }; 65 | 07239C2420B733490016F553 /* TransitionAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionAnimation.swift; sourceTree = ""; }; 66 | 07239C2520B733490016F553 /* PrimitiveAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrimitiveAnimation.swift; sourceTree = ""; }; 67 | 07239C2620B733490016F553 /* AnyAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnyAnimation.swift; sourceTree = ""; }; 68 | 07239C2720B733490016F553 /* AnimationGroup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationGroup.swift; sourceTree = ""; }; 69 | 07239C2820B733490016F553 /* PropertyAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PropertyAnimation.swift; sourceTree = ""; }; 70 | 07239C2920B733490016F553 /* BasicAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasicAnimation.swift; sourceTree = ""; }; 71 | 07239C2A20B733490016F553 /* SpringAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpringAnimation.swift; sourceTree = ""; }; 72 | 07239C2B20B733490016F553 /* AnimationKeyPaths.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationKeyPaths.swift; sourceTree = ""; }; 73 | 07239C2C20B733490016F553 /* TimingFunction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimingFunction.swift; sourceTree = ""; }; 74 | 07239C2D20B733490016F553 /* KeyframeAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyframeAnimation.swift; sourceTree = ""; }; 75 | 0746D5C520B5AE6600D21053 /* TheAnimation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TheAnimation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 76 | 07EB622220B5D8C600943B5A /* TheAnimation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TheAnimation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 37BD759820A5D050009219F2 /* TheAnimation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TheAnimation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | 37BD75A120A5D050009219F2 /* TheAnimationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TheAnimationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 79 | 37BD75A620A5D050009219F2 /* TheAnimationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TheAnimationTests.swift; sourceTree = ""; }; 80 | 37BD75A820A5D050009219F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 81 | 9D00EA3E20E9F30D00D820FE /* TheAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TheAnimation.h; path = TheAnimation/TheAnimation.h; sourceTree = ""; }; 82 | 9D00EA4120E9F31900D820FE /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = ""; }; 83 | 9D00EA4220E9F31900D820FE /* Info-tvOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-tvOS.plist"; sourceTree = ""; }; 84 | 9D00EA4320E9F31900D820FE /* Info-macOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-macOS.plist"; sourceTree = ""; }; 85 | EDECABFD23D5FD7900B37022 /* CAAnimationDelegateProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CAAnimationDelegateProxy.swift; sourceTree = ""; }; 86 | /* End PBXFileReference section */ 87 | 88 | /* Begin PBXFrameworksBuildPhase section */ 89 | 0746D5C120B5AE6600D21053 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | 07EB621E20B5D8C600943B5A /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | 37BD759420A5D050009219F2 /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | 37BD759E20A5D050009219F2 /* Frameworks */ = { 111 | isa = PBXFrameworksBuildPhase; 112 | buildActionMask = 2147483647; 113 | files = ( 114 | 37BD75A220A5D050009219F2 /* TheAnimation.framework in Frameworks */, 115 | ); 116 | runOnlyForDeploymentPostprocessing = 0; 117 | }; 118 | /* End PBXFrameworksBuildPhase section */ 119 | 120 | /* Begin PBXGroup section */ 121 | 07239C2220B733490016F553 /* Source */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | EDECABF823D5FA7600B37022 /* Internal */, 125 | 07239C2320B733490016F553 /* Animation.swift */, 126 | 07239C2420B733490016F553 /* TransitionAnimation.swift */, 127 | 07239C2520B733490016F553 /* PrimitiveAnimation.swift */, 128 | 07239C2620B733490016F553 /* AnyAnimation.swift */, 129 | 07239C2720B733490016F553 /* AnimationGroup.swift */, 130 | 07239C2820B733490016F553 /* PropertyAnimation.swift */, 131 | 07239C2920B733490016F553 /* BasicAnimation.swift */, 132 | 07239C2A20B733490016F553 /* SpringAnimation.swift */, 133 | 07239C2B20B733490016F553 /* AnimationKeyPaths.swift */, 134 | 07239C2C20B733490016F553 /* TimingFunction.swift */, 135 | 07239C2D20B733490016F553 /* KeyframeAnimation.swift */, 136 | ); 137 | name = Source; 138 | path = TheAnimation/Source; 139 | sourceTree = ""; 140 | }; 141 | 37BD758E20A5D050009219F2 = { 142 | isa = PBXGroup; 143 | children = ( 144 | 9D00EA3E20E9F30D00D820FE /* TheAnimation.h */, 145 | 9D00EA4020E9F31900D820FE /* Resource */, 146 | 07239C2220B733490016F553 /* Source */, 147 | 37BD75A520A5D050009219F2 /* TheAnimationTests */, 148 | 37BD759920A5D050009219F2 /* Products */, 149 | ); 150 | sourceTree = ""; 151 | }; 152 | 37BD759920A5D050009219F2 /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 37BD759820A5D050009219F2 /* TheAnimation.framework */, 156 | 37BD75A120A5D050009219F2 /* TheAnimationTests.xctest */, 157 | 0746D5C520B5AE6600D21053 /* TheAnimation.framework */, 158 | 07EB622220B5D8C600943B5A /* TheAnimation.framework */, 159 | ); 160 | name = Products; 161 | sourceTree = ""; 162 | }; 163 | 37BD75A520A5D050009219F2 /* TheAnimationTests */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 37BD75A620A5D050009219F2 /* TheAnimationTests.swift */, 167 | 37BD75A820A5D050009219F2 /* Info.plist */, 168 | ); 169 | path = TheAnimationTests; 170 | sourceTree = ""; 171 | }; 172 | 9D00EA4020E9F31900D820FE /* Resource */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 9D00EA4120E9F31900D820FE /* Info-iOS.plist */, 176 | 9D00EA4220E9F31900D820FE /* Info-tvOS.plist */, 177 | 9D00EA4320E9F31900D820FE /* Info-macOS.plist */, 178 | ); 179 | name = Resource; 180 | path = TheAnimation/Resource; 181 | sourceTree = ""; 182 | }; 183 | EDECABF823D5FA7600B37022 /* Internal */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | EDECABFD23D5FD7900B37022 /* CAAnimationDelegateProxy.swift */, 187 | ); 188 | path = Internal; 189 | sourceTree = ""; 190 | }; 191 | /* End PBXGroup section */ 192 | 193 | /* Begin PBXHeadersBuildPhase section */ 194 | 0746D5C220B5AE6600D21053 /* Headers */ = { 195 | isa = PBXHeadersBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | 9D00EA4420E9F31E00D820FE /* TheAnimation.h in Headers */, 199 | ); 200 | runOnlyForDeploymentPostprocessing = 0; 201 | }; 202 | 07EB621F20B5D8C600943B5A /* Headers */ = { 203 | isa = PBXHeadersBuildPhase; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | 9D00EA4520E9F31F00D820FE /* TheAnimation.h in Headers */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | 37BD759520A5D050009219F2 /* Headers */ = { 211 | isa = PBXHeadersBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 9D00EA3F20E9F30D00D820FE /* TheAnimation.h in Headers */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXHeadersBuildPhase section */ 219 | 220 | /* Begin PBXNativeTarget section */ 221 | 0746D5C420B5AE6600D21053 /* TheAnimation-macOS */ = { 222 | isa = PBXNativeTarget; 223 | buildConfigurationList = 0746D5CA20B5AE6600D21053 /* Build configuration list for PBXNativeTarget "TheAnimation-macOS" */; 224 | buildPhases = ( 225 | 0746D5C020B5AE6600D21053 /* Sources */, 226 | 0746D5C120B5AE6600D21053 /* Frameworks */, 227 | 0746D5C220B5AE6600D21053 /* Headers */, 228 | 0746D5C320B5AE6600D21053 /* Resources */, 229 | ); 230 | buildRules = ( 231 | ); 232 | dependencies = ( 233 | ); 234 | name = "TheAnimation-macOS"; 235 | productName = "TheAnimation-macos"; 236 | productReference = 0746D5C520B5AE6600D21053 /* TheAnimation.framework */; 237 | productType = "com.apple.product-type.framework"; 238 | }; 239 | 07EB622120B5D8C600943B5A /* TheAnimation-tvOS */ = { 240 | isa = PBXNativeTarget; 241 | buildConfigurationList = 07EB622920B5D8C600943B5A /* Build configuration list for PBXNativeTarget "TheAnimation-tvOS" */; 242 | buildPhases = ( 243 | 07EB621D20B5D8C600943B5A /* Sources */, 244 | 07EB621E20B5D8C600943B5A /* Frameworks */, 245 | 07EB621F20B5D8C600943B5A /* Headers */, 246 | 07EB622020B5D8C600943B5A /* Resources */, 247 | ); 248 | buildRules = ( 249 | ); 250 | dependencies = ( 251 | ); 252 | name = "TheAnimation-tvOS"; 253 | productName = "TheAnimation-tvOS"; 254 | productReference = 07EB622220B5D8C600943B5A /* TheAnimation.framework */; 255 | productType = "com.apple.product-type.framework"; 256 | }; 257 | 37BD759720A5D050009219F2 /* TheAnimation-iOS */ = { 258 | isa = PBXNativeTarget; 259 | buildConfigurationList = 37BD75AC20A5D050009219F2 /* Build configuration list for PBXNativeTarget "TheAnimation-iOS" */; 260 | buildPhases = ( 261 | 37BD759320A5D050009219F2 /* Sources */, 262 | 37BD759420A5D050009219F2 /* Frameworks */, 263 | 37BD759520A5D050009219F2 /* Headers */, 264 | 37BD759620A5D050009219F2 /* Resources */, 265 | ); 266 | buildRules = ( 267 | ); 268 | dependencies = ( 269 | ); 270 | name = "TheAnimation-iOS"; 271 | productName = TheAnimation; 272 | productReference = 37BD759820A5D050009219F2 /* TheAnimation.framework */; 273 | productType = "com.apple.product-type.framework"; 274 | }; 275 | 37BD75A020A5D050009219F2 /* TheAnimationTests */ = { 276 | isa = PBXNativeTarget; 277 | buildConfigurationList = 37BD75AF20A5D050009219F2 /* Build configuration list for PBXNativeTarget "TheAnimationTests" */; 278 | buildPhases = ( 279 | 37BD759D20A5D050009219F2 /* Sources */, 280 | 37BD759E20A5D050009219F2 /* Frameworks */, 281 | 37BD759F20A5D050009219F2 /* Resources */, 282 | ); 283 | buildRules = ( 284 | ); 285 | dependencies = ( 286 | 37BD75A420A5D050009219F2 /* PBXTargetDependency */, 287 | ); 288 | name = TheAnimationTests; 289 | productName = TheAnimationTests; 290 | productReference = 37BD75A120A5D050009219F2 /* TheAnimationTests.xctest */; 291 | productType = "com.apple.product-type.bundle.unit-test"; 292 | }; 293 | /* End PBXNativeTarget section */ 294 | 295 | /* Begin PBXProject section */ 296 | 37BD758F20A5D050009219F2 /* Project object */ = { 297 | isa = PBXProject; 298 | attributes = { 299 | LastSwiftUpdateCheck = 0930; 300 | LastUpgradeCheck = 1000; 301 | ORGANIZATIONNAME = "marty-suzuki"; 302 | TargetAttributes = { 303 | 0746D5C420B5AE6600D21053 = { 304 | CreatedOnToolsVersion = 9.3.1; 305 | LastSwiftMigration = 0930; 306 | }; 307 | 07EB622120B5D8C600943B5A = { 308 | CreatedOnToolsVersion = 9.3.1; 309 | }; 310 | 37BD759720A5D050009219F2 = { 311 | CreatedOnToolsVersion = 9.3; 312 | LastSwiftMigration = 1000; 313 | }; 314 | 37BD75A020A5D050009219F2 = { 315 | CreatedOnToolsVersion = 9.3; 316 | LastSwiftMigration = 1000; 317 | }; 318 | }; 319 | }; 320 | buildConfigurationList = 37BD759220A5D050009219F2 /* Build configuration list for PBXProject "TheAnimation" */; 321 | compatibilityVersion = "Xcode 9.3"; 322 | developmentRegion = en; 323 | hasScannedForEncodings = 0; 324 | knownRegions = ( 325 | en, 326 | Base, 327 | ); 328 | mainGroup = 37BD758E20A5D050009219F2; 329 | productRefGroup = 37BD759920A5D050009219F2 /* Products */; 330 | projectDirPath = ""; 331 | projectRoot = ""; 332 | targets = ( 333 | 37BD759720A5D050009219F2 /* TheAnimation-iOS */, 334 | 37BD75A020A5D050009219F2 /* TheAnimationTests */, 335 | 0746D5C420B5AE6600D21053 /* TheAnimation-macOS */, 336 | 07EB622120B5D8C600943B5A /* TheAnimation-tvOS */, 337 | ); 338 | }; 339 | /* End PBXProject section */ 340 | 341 | /* Begin PBXResourcesBuildPhase section */ 342 | 0746D5C320B5AE6600D21053 /* Resources */ = { 343 | isa = PBXResourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | }; 349 | 07EB622020B5D8C600943B5A /* Resources */ = { 350 | isa = PBXResourcesBuildPhase; 351 | buildActionMask = 2147483647; 352 | files = ( 353 | ); 354 | runOnlyForDeploymentPostprocessing = 0; 355 | }; 356 | 37BD759620A5D050009219F2 /* Resources */ = { 357 | isa = PBXResourcesBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | ); 361 | runOnlyForDeploymentPostprocessing = 0; 362 | }; 363 | 37BD759F20A5D050009219F2 /* Resources */ = { 364 | isa = PBXResourcesBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | ); 368 | runOnlyForDeploymentPostprocessing = 0; 369 | }; 370 | /* End PBXResourcesBuildPhase section */ 371 | 372 | /* Begin PBXSourcesBuildPhase section */ 373 | 0746D5C020B5AE6600D21053 /* Sources */ = { 374 | isa = PBXSourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | 07239C3520B733490016F553 /* PrimitiveAnimation.swift in Sources */, 378 | 07239C3820B733490016F553 /* AnyAnimation.swift in Sources */, 379 | 07239C4D20B733490016F553 /* KeyframeAnimation.swift in Sources */, 380 | EDECABFF23D5FD7900B37022 /* CAAnimationDelegateProxy.swift in Sources */, 381 | 07239C2F20B733490016F553 /* Animation.swift in Sources */, 382 | 07239C4420B733490016F553 /* SpringAnimation.swift in Sources */, 383 | 07239C3E20B733490016F553 /* PropertyAnimation.swift in Sources */, 384 | 07239C4A20B733490016F553 /* TimingFunction.swift in Sources */, 385 | 07239C3220B733490016F553 /* TransitionAnimation.swift in Sources */, 386 | 07239C3B20B733490016F553 /* AnimationGroup.swift in Sources */, 387 | 07239C4120B733490016F553 /* BasicAnimation.swift in Sources */, 388 | 07239C4720B733490016F553 /* AnimationKeyPaths.swift in Sources */, 389 | ); 390 | runOnlyForDeploymentPostprocessing = 0; 391 | }; 392 | 07EB621D20B5D8C600943B5A /* Sources */ = { 393 | isa = PBXSourcesBuildPhase; 394 | buildActionMask = 2147483647; 395 | files = ( 396 | 07239C3620B733490016F553 /* PrimitiveAnimation.swift in Sources */, 397 | 07239C3920B733490016F553 /* AnyAnimation.swift in Sources */, 398 | 07239C4E20B733490016F553 /* KeyframeAnimation.swift in Sources */, 399 | EDECAC0023D5FD7900B37022 /* CAAnimationDelegateProxy.swift in Sources */, 400 | 07239C3020B733490016F553 /* Animation.swift in Sources */, 401 | 07239C4520B733490016F553 /* SpringAnimation.swift in Sources */, 402 | 07239C3F20B733490016F553 /* PropertyAnimation.swift in Sources */, 403 | 07239C4B20B733490016F553 /* TimingFunction.swift in Sources */, 404 | 07239C3320B733490016F553 /* TransitionAnimation.swift in Sources */, 405 | 07239C3C20B733490016F553 /* AnimationGroup.swift in Sources */, 406 | 07239C4220B733490016F553 /* BasicAnimation.swift in Sources */, 407 | 07239C4820B733490016F553 /* AnimationKeyPaths.swift in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | 37BD759320A5D050009219F2 /* Sources */ = { 412 | isa = PBXSourcesBuildPhase; 413 | buildActionMask = 2147483647; 414 | files = ( 415 | 07239C3420B733490016F553 /* PrimitiveAnimation.swift in Sources */, 416 | 07239C3720B733490016F553 /* AnyAnimation.swift in Sources */, 417 | 07239C4C20B733490016F553 /* KeyframeAnimation.swift in Sources */, 418 | EDECABFE23D5FD7900B37022 /* CAAnimationDelegateProxy.swift in Sources */, 419 | 07239C2E20B733490016F553 /* Animation.swift in Sources */, 420 | 07239C4320B733490016F553 /* SpringAnimation.swift in Sources */, 421 | 07239C3D20B733490016F553 /* PropertyAnimation.swift in Sources */, 422 | 07239C4920B733490016F553 /* TimingFunction.swift in Sources */, 423 | 07239C3120B733490016F553 /* TransitionAnimation.swift in Sources */, 424 | 07239C3A20B733490016F553 /* AnimationGroup.swift in Sources */, 425 | 07239C4020B733490016F553 /* BasicAnimation.swift in Sources */, 426 | 07239C4620B733490016F553 /* AnimationKeyPaths.swift in Sources */, 427 | ); 428 | runOnlyForDeploymentPostprocessing = 0; 429 | }; 430 | 37BD759D20A5D050009219F2 /* Sources */ = { 431 | isa = PBXSourcesBuildPhase; 432 | buildActionMask = 2147483647; 433 | files = ( 434 | 37BD75A720A5D050009219F2 /* TheAnimationTests.swift in Sources */, 435 | ); 436 | runOnlyForDeploymentPostprocessing = 0; 437 | }; 438 | /* End PBXSourcesBuildPhase section */ 439 | 440 | /* Begin PBXTargetDependency section */ 441 | 37BD75A420A5D050009219F2 /* PBXTargetDependency */ = { 442 | isa = PBXTargetDependency; 443 | target = 37BD759720A5D050009219F2 /* TheAnimation-iOS */; 444 | targetProxy = 37BD75A320A5D050009219F2 /* PBXContainerItemProxy */; 445 | }; 446 | /* End PBXTargetDependency section */ 447 | 448 | /* Begin XCBuildConfiguration section */ 449 | 0746D5CB20B5AE6600D21053 /* Debug */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | CLANG_ENABLE_MODULES = YES; 453 | CODE_SIGN_IDENTITY = ""; 454 | CODE_SIGN_STYLE = Manual; 455 | COMBINE_HIDPI_IMAGES = YES; 456 | DEFINES_MODULE = YES; 457 | DEVELOPMENT_TEAM = ""; 458 | DYLIB_COMPATIBILITY_VERSION = 1; 459 | DYLIB_CURRENT_VERSION = 1; 460 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 461 | FRAMEWORK_VERSION = A; 462 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimation/Resource/Info-macOS.plist"; 463 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 464 | LD_RUNPATH_SEARCH_PATHS = ( 465 | "$(inherited)", 466 | "@executable_path/../Frameworks", 467 | "@loader_path/Frameworks", 468 | ); 469 | MACOSX_DEPLOYMENT_TARGET = 10.11; 470 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimation"; 471 | PRODUCT_NAME = TheAnimation; 472 | PROVISIONING_PROFILE_SPECIFIER = ""; 473 | SDKROOT = macosx; 474 | SKIP_INSTALL = YES; 475 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 476 | SWIFT_VERSION = 4.0; 477 | }; 478 | name = Debug; 479 | }; 480 | 0746D5CC20B5AE6600D21053 /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | CLANG_ENABLE_MODULES = YES; 484 | CODE_SIGN_IDENTITY = ""; 485 | CODE_SIGN_STYLE = Manual; 486 | COMBINE_HIDPI_IMAGES = YES; 487 | DEFINES_MODULE = YES; 488 | DEVELOPMENT_TEAM = ""; 489 | DYLIB_COMPATIBILITY_VERSION = 1; 490 | DYLIB_CURRENT_VERSION = 1; 491 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 492 | FRAMEWORK_VERSION = A; 493 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimation/Resource/Info-macOS.plist"; 494 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 495 | LD_RUNPATH_SEARCH_PATHS = ( 496 | "$(inherited)", 497 | "@executable_path/../Frameworks", 498 | "@loader_path/Frameworks", 499 | ); 500 | MACOSX_DEPLOYMENT_TARGET = 10.11; 501 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimation"; 502 | PRODUCT_NAME = TheAnimation; 503 | PROVISIONING_PROFILE_SPECIFIER = ""; 504 | SDKROOT = macosx; 505 | SKIP_INSTALL = YES; 506 | SWIFT_VERSION = 4.0; 507 | }; 508 | name = Release; 509 | }; 510 | 07EB622720B5D8C600943B5A /* Debug */ = { 511 | isa = XCBuildConfiguration; 512 | buildSettings = { 513 | CODE_SIGN_IDENTITY = ""; 514 | CODE_SIGN_STYLE = Automatic; 515 | DEFINES_MODULE = YES; 516 | DEVELOPMENT_TEAM = ""; 517 | DYLIB_COMPATIBILITY_VERSION = 1; 518 | DYLIB_CURRENT_VERSION = 1; 519 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 520 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimation/Resource/Info-tvOS.plist"; 521 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 522 | LD_RUNPATH_SEARCH_PATHS = ( 523 | "$(inherited)", 524 | "@executable_path/Frameworks", 525 | "@loader_path/Frameworks", 526 | ); 527 | PRODUCT_BUNDLE_IDENTIFIER = "es.carlosypunto.TheAnimation-tvOS"; 528 | PRODUCT_NAME = TheAnimation; 529 | SDKROOT = appletvos; 530 | SKIP_INSTALL = YES; 531 | SWIFT_VERSION = 4.0; 532 | TARGETED_DEVICE_FAMILY = 3; 533 | TVOS_DEPLOYMENT_TARGET = 9.0; 534 | }; 535 | name = Debug; 536 | }; 537 | 07EB622820B5D8C600943B5A /* Release */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | CODE_SIGN_IDENTITY = ""; 541 | CODE_SIGN_STYLE = Automatic; 542 | DEFINES_MODULE = YES; 543 | DEVELOPMENT_TEAM = ""; 544 | DYLIB_COMPATIBILITY_VERSION = 1; 545 | DYLIB_CURRENT_VERSION = 1; 546 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 547 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimation/Resource/Info-tvOS.plist"; 548 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 549 | LD_RUNPATH_SEARCH_PATHS = ( 550 | "$(inherited)", 551 | "@executable_path/Frameworks", 552 | "@loader_path/Frameworks", 553 | ); 554 | PRODUCT_BUNDLE_IDENTIFIER = "es.carlosypunto.TheAnimation-tvOS"; 555 | PRODUCT_NAME = TheAnimation; 556 | SDKROOT = appletvos; 557 | SKIP_INSTALL = YES; 558 | SWIFT_VERSION = 4.0; 559 | TARGETED_DEVICE_FAMILY = 3; 560 | TVOS_DEPLOYMENT_TARGET = 9.0; 561 | }; 562 | name = Release; 563 | }; 564 | 37BD75AA20A5D050009219F2 /* Debug */ = { 565 | isa = XCBuildConfiguration; 566 | buildSettings = { 567 | ALWAYS_SEARCH_USER_PATHS = NO; 568 | CLANG_ANALYZER_NONNULL = YES; 569 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 570 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 571 | CLANG_CXX_LIBRARY = "libc++"; 572 | CLANG_ENABLE_MODULES = YES; 573 | CLANG_ENABLE_OBJC_ARC = YES; 574 | CLANG_ENABLE_OBJC_WEAK = YES; 575 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 576 | CLANG_WARN_BOOL_CONVERSION = YES; 577 | CLANG_WARN_COMMA = YES; 578 | CLANG_WARN_CONSTANT_CONVERSION = YES; 579 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 580 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 581 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 582 | CLANG_WARN_EMPTY_BODY = YES; 583 | CLANG_WARN_ENUM_CONVERSION = YES; 584 | CLANG_WARN_INFINITE_RECURSION = YES; 585 | CLANG_WARN_INT_CONVERSION = YES; 586 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 587 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 588 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 589 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 590 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 591 | CLANG_WARN_STRICT_PROTOTYPES = YES; 592 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 593 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 594 | CLANG_WARN_UNREACHABLE_CODE = YES; 595 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 596 | CODE_SIGN_IDENTITY = "iPhone Developer"; 597 | COPY_PHASE_STRIP = NO; 598 | CURRENT_PROJECT_VERSION = 1; 599 | DEBUG_INFORMATION_FORMAT = dwarf; 600 | ENABLE_STRICT_OBJC_MSGSEND = YES; 601 | ENABLE_TESTABILITY = YES; 602 | GCC_C_LANGUAGE_STANDARD = gnu11; 603 | GCC_DYNAMIC_NO_PIC = NO; 604 | GCC_NO_COMMON_BLOCKS = YES; 605 | GCC_OPTIMIZATION_LEVEL = 0; 606 | GCC_PREPROCESSOR_DEFINITIONS = ( 607 | "DEBUG=1", 608 | "$(inherited)", 609 | ); 610 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 611 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 612 | GCC_WARN_UNDECLARED_SELECTOR = YES; 613 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 614 | GCC_WARN_UNUSED_FUNCTION = YES; 615 | GCC_WARN_UNUSED_VARIABLE = YES; 616 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 617 | MTL_ENABLE_DEBUG_INFO = YES; 618 | ONLY_ACTIVE_ARCH = YES; 619 | SDKROOT = iphoneos; 620 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 621 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 622 | VERSIONING_SYSTEM = "apple-generic"; 623 | VERSION_INFO_PREFIX = ""; 624 | }; 625 | name = Debug; 626 | }; 627 | 37BD75AB20A5D050009219F2 /* Release */ = { 628 | isa = XCBuildConfiguration; 629 | buildSettings = { 630 | ALWAYS_SEARCH_USER_PATHS = NO; 631 | CLANG_ANALYZER_NONNULL = YES; 632 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 633 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 634 | CLANG_CXX_LIBRARY = "libc++"; 635 | CLANG_ENABLE_MODULES = YES; 636 | CLANG_ENABLE_OBJC_ARC = YES; 637 | CLANG_ENABLE_OBJC_WEAK = YES; 638 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 639 | CLANG_WARN_BOOL_CONVERSION = YES; 640 | CLANG_WARN_COMMA = YES; 641 | CLANG_WARN_CONSTANT_CONVERSION = YES; 642 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 643 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 644 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 645 | CLANG_WARN_EMPTY_BODY = YES; 646 | CLANG_WARN_ENUM_CONVERSION = YES; 647 | CLANG_WARN_INFINITE_RECURSION = YES; 648 | CLANG_WARN_INT_CONVERSION = YES; 649 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 650 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 651 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 652 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 653 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 654 | CLANG_WARN_STRICT_PROTOTYPES = YES; 655 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 656 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 657 | CLANG_WARN_UNREACHABLE_CODE = YES; 658 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 659 | CODE_SIGN_IDENTITY = "iPhone Developer"; 660 | COPY_PHASE_STRIP = NO; 661 | CURRENT_PROJECT_VERSION = 1; 662 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 663 | ENABLE_NS_ASSERTIONS = NO; 664 | ENABLE_STRICT_OBJC_MSGSEND = YES; 665 | GCC_C_LANGUAGE_STANDARD = gnu11; 666 | GCC_NO_COMMON_BLOCKS = YES; 667 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 668 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 669 | GCC_WARN_UNDECLARED_SELECTOR = YES; 670 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 671 | GCC_WARN_UNUSED_FUNCTION = YES; 672 | GCC_WARN_UNUSED_VARIABLE = YES; 673 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 674 | MTL_ENABLE_DEBUG_INFO = NO; 675 | SDKROOT = iphoneos; 676 | SWIFT_COMPILATION_MODE = wholemodule; 677 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 678 | VALIDATE_PRODUCT = YES; 679 | VERSIONING_SYSTEM = "apple-generic"; 680 | VERSION_INFO_PREFIX = ""; 681 | }; 682 | name = Release; 683 | }; 684 | 37BD75AD20A5D050009219F2 /* Debug */ = { 685 | isa = XCBuildConfiguration; 686 | buildSettings = { 687 | CLANG_ENABLE_MODULES = YES; 688 | CODE_SIGN_IDENTITY = ""; 689 | CODE_SIGN_STYLE = Manual; 690 | DEFINES_MODULE = YES; 691 | DEVELOPMENT_TEAM = ""; 692 | DYLIB_COMPATIBILITY_VERSION = 1; 693 | DYLIB_CURRENT_VERSION = 1; 694 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 695 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimation/Resource/Info-iOS.plist"; 696 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 697 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 698 | LD_RUNPATH_SEARCH_PATHS = ( 699 | "$(inherited)", 700 | "@executable_path/Frameworks", 701 | "@loader_path/Frameworks", 702 | ); 703 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimation"; 704 | PRODUCT_NAME = TheAnimation; 705 | PROVISIONING_PROFILE_SPECIFIER = ""; 706 | SKIP_INSTALL = YES; 707 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 708 | SWIFT_VERSION = 4.2; 709 | TARGETED_DEVICE_FAMILY = "1,2"; 710 | }; 711 | name = Debug; 712 | }; 713 | 37BD75AE20A5D050009219F2 /* Release */ = { 714 | isa = XCBuildConfiguration; 715 | buildSettings = { 716 | CLANG_ENABLE_MODULES = YES; 717 | CODE_SIGN_IDENTITY = ""; 718 | CODE_SIGN_STYLE = Manual; 719 | DEFINES_MODULE = YES; 720 | DEVELOPMENT_TEAM = ""; 721 | DYLIB_COMPATIBILITY_VERSION = 1; 722 | DYLIB_CURRENT_VERSION = 1; 723 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 724 | INFOPLIST_FILE = "$(SRCROOT)/TheAnimation/Resource/Info-iOS.plist"; 725 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 726 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 727 | LD_RUNPATH_SEARCH_PATHS = ( 728 | "$(inherited)", 729 | "@executable_path/Frameworks", 730 | "@loader_path/Frameworks", 731 | ); 732 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimation"; 733 | PRODUCT_NAME = TheAnimation; 734 | PROVISIONING_PROFILE_SPECIFIER = ""; 735 | SKIP_INSTALL = YES; 736 | SWIFT_VERSION = 4.2; 737 | TARGETED_DEVICE_FAMILY = "1,2"; 738 | }; 739 | name = Release; 740 | }; 741 | 37BD75B020A5D050009219F2 /* Debug */ = { 742 | isa = XCBuildConfiguration; 743 | buildSettings = { 744 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 745 | CODE_SIGN_STYLE = Manual; 746 | DEVELOPMENT_TEAM = ""; 747 | INFOPLIST_FILE = TheAnimationTests/Info.plist; 748 | LD_RUNPATH_SEARCH_PATHS = ( 749 | "$(inherited)", 750 | "@executable_path/Frameworks", 751 | "@loader_path/Frameworks", 752 | ); 753 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationTests"; 754 | PRODUCT_NAME = "$(TARGET_NAME)"; 755 | PROVISIONING_PROFILE_SPECIFIER = ""; 756 | SWIFT_VERSION = 4.2; 757 | TARGETED_DEVICE_FAMILY = "1,2"; 758 | }; 759 | name = Debug; 760 | }; 761 | 37BD75B120A5D050009219F2 /* Release */ = { 762 | isa = XCBuildConfiguration; 763 | buildSettings = { 764 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 765 | CODE_SIGN_STYLE = Manual; 766 | DEVELOPMENT_TEAM = ""; 767 | INFOPLIST_FILE = TheAnimationTests/Info.plist; 768 | LD_RUNPATH_SEARCH_PATHS = ( 769 | "$(inherited)", 770 | "@executable_path/Frameworks", 771 | "@loader_path/Frameworks", 772 | ); 773 | PRODUCT_BUNDLE_IDENTIFIER = "jp.marty-suzuki.TheAnimationTests"; 774 | PRODUCT_NAME = "$(TARGET_NAME)"; 775 | PROVISIONING_PROFILE_SPECIFIER = ""; 776 | SWIFT_VERSION = 4.2; 777 | TARGETED_DEVICE_FAMILY = "1,2"; 778 | }; 779 | name = Release; 780 | }; 781 | /* End XCBuildConfiguration section */ 782 | 783 | /* Begin XCConfigurationList section */ 784 | 0746D5CA20B5AE6600D21053 /* Build configuration list for PBXNativeTarget "TheAnimation-macOS" */ = { 785 | isa = XCConfigurationList; 786 | buildConfigurations = ( 787 | 0746D5CB20B5AE6600D21053 /* Debug */, 788 | 0746D5CC20B5AE6600D21053 /* Release */, 789 | ); 790 | defaultConfigurationIsVisible = 0; 791 | defaultConfigurationName = Release; 792 | }; 793 | 07EB622920B5D8C600943B5A /* Build configuration list for PBXNativeTarget "TheAnimation-tvOS" */ = { 794 | isa = XCConfigurationList; 795 | buildConfigurations = ( 796 | 07EB622720B5D8C600943B5A /* Debug */, 797 | 07EB622820B5D8C600943B5A /* Release */, 798 | ); 799 | defaultConfigurationIsVisible = 0; 800 | defaultConfigurationName = Release; 801 | }; 802 | 37BD759220A5D050009219F2 /* Build configuration list for PBXProject "TheAnimation" */ = { 803 | isa = XCConfigurationList; 804 | buildConfigurations = ( 805 | 37BD75AA20A5D050009219F2 /* Debug */, 806 | 37BD75AB20A5D050009219F2 /* Release */, 807 | ); 808 | defaultConfigurationIsVisible = 0; 809 | defaultConfigurationName = Release; 810 | }; 811 | 37BD75AC20A5D050009219F2 /* Build configuration list for PBXNativeTarget "TheAnimation-iOS" */ = { 812 | isa = XCConfigurationList; 813 | buildConfigurations = ( 814 | 37BD75AD20A5D050009219F2 /* Debug */, 815 | 37BD75AE20A5D050009219F2 /* Release */, 816 | ); 817 | defaultConfigurationIsVisible = 0; 818 | defaultConfigurationName = Release; 819 | }; 820 | 37BD75AF20A5D050009219F2 /* Build configuration list for PBXNativeTarget "TheAnimationTests" */ = { 821 | isa = XCConfigurationList; 822 | buildConfigurations = ( 823 | 37BD75B020A5D050009219F2 /* Debug */, 824 | 37BD75B120A5D050009219F2 /* Release */, 825 | ); 826 | defaultConfigurationIsVisible = 0; 827 | defaultConfigurationName = Release; 828 | }; 829 | /* End XCConfigurationList section */ 830 | }; 831 | rootObject = 37BD758F20A5D050009219F2 /* Project object */; 832 | } 833 | -------------------------------------------------------------------------------- /TheAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TheAnimation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TheAnimation.xcodeproj/xcshareddata/xcschemes/TheAnimation-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /TheAnimation.xcodeproj/xcshareddata/xcschemes/TheAnimation-macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /TheAnimation.xcodeproj/xcshareddata/xcschemes/TheAnimation-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /TheAnimation/Resource/Info-iOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | TheAnimation 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /TheAnimation/Resource/Info-macOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSHumanReadableCopyright 22 | Copyright © 2018 marty-suzuki. All rights reserved. 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /TheAnimation/Resource/Info-tvOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /TheAnimation/Source/Animation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Animation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/12. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | #if os(iOS) || os(watchOS) || os(tvOS) 10 | import UIKit 11 | public typealias View = UIView 12 | #elseif os(OSX) 13 | import AppKit 14 | public typealias View = NSView 15 | #endif 16 | import QuartzCore.CoreAnimation 17 | 18 | public protocol Animation: class { 19 | var animation: CAAnimation { get } 20 | var key: String { get } 21 | } 22 | 23 | extension Animation { 24 | public var timingFunction: TimingFunction? { 25 | set { animation.timingFunction = newValue?.rawValue } 26 | get { return animation.timingFunction.flatMap(TimingFunction.init) } 27 | } 28 | 29 | public var isRemovedOnCompletion: Bool { 30 | set { animation.isRemovedOnCompletion = newValue } 31 | get { return animation.isRemovedOnCompletion } 32 | } 33 | 34 | public var beginTime: TimeInterval { 35 | set { animation.beginTime = newValue } 36 | get { return animation.beginTime } 37 | } 38 | 39 | public var duration: TimeInterval { 40 | set { animation.duration = newValue } 41 | get { return animation.duration } 42 | } 43 | 44 | public var speed: TimeInterval { 45 | set { animation.speed = Float(newValue) } 46 | get { return TimeInterval(animation.speed) } 47 | } 48 | 49 | public var timeOffset: TimeInterval { 50 | set { animation.timeOffset = newValue } 51 | get { return animation.timeOffset } 52 | } 53 | 54 | public var repeatCount: Double { 55 | set { animation.repeatCount = Float(newValue) } 56 | get { return Double(animation.repeatCount) } 57 | } 58 | 59 | public var repeatDuration: TimeInterval { 60 | set { animation.repeatDuration = newValue } 61 | get { return animation.repeatDuration } 62 | } 63 | 64 | public var autoreverses: Bool { 65 | set { animation.autoreverses = newValue } 66 | get { return animation.autoreverses } 67 | } 68 | 69 | public var fillMode: FillMode { 70 | set { animation.fillMode = newValue.rawValue } 71 | get { return FillMode(rawValue: animation.fillMode) } 72 | } 73 | 74 | public static func defaultValue(for keyPath: AnimationKeyPath) -> T? { 75 | return CAAnimation.defaultValue(forKey: keyPath.rawValue) as? T 76 | } 77 | 78 | public func shouldArchiveValue(for keyPath: AnimationKeyPath) -> Bool { 79 | return animation.shouldArchiveValue(forKey: keyPath.rawValue) 80 | } 81 | 82 | public func run(forKey event: String, object anObject: Any, arguments dict: [AnyHashable : Any]?) { 83 | animation.run(forKey: event, object: anObject, arguments: dict) 84 | } 85 | 86 | @discardableResult 87 | public func animate(in layer: CALayer) -> AnimationCanceller { 88 | layer.add(animation, forKey: key) 89 | return AnimationCanceller(layer: layer, key: key) 90 | } 91 | 92 | @discardableResult 93 | public func animate(in view: View) -> AnimationCanceller { 94 | #if os(iOS) || os(watchOS) || os(tvOS) 95 | return animate(in: view.layer) 96 | #elseif os(OSX) 97 | view.wantsLayer = true 98 | if let layer = view.layer { 99 | return animate(in: layer) 100 | } else { 101 | fatalError("view.layer is nil in \(#file)_\(#function)_\(#line)") 102 | } 103 | #endif 104 | } 105 | 106 | public func setAnimationDidStart(handler: (() -> Void)?) { 107 | guard let handler = handler else { 108 | animation.delegateProxy.didStart = nil 109 | return 110 | } 111 | 112 | let t = type(of: animation) 113 | animation.delegateProxy.didStart = { anim in 114 | guard t === type(of: anim) else { 115 | return 116 | } 117 | handler() 118 | } 119 | } 120 | 121 | public func setAnimationDidStop(handler: ((Bool) -> Void)?) { 122 | guard let handler = handler else { 123 | animation.delegateProxy.didStop = nil 124 | return 125 | } 126 | 127 | let t = type(of: animation) 128 | animation.delegateProxy.didStop = { anim, finished in 129 | guard t === type(of: anim) else { 130 | return 131 | } 132 | handler(finished) 133 | } 134 | } 135 | } 136 | 137 | public struct FillMode { 138 | 139 | #if swift(>=4.2) 140 | typealias RawValue = CAMediaTimingFillMode 141 | public static let forwards = FillMode(rawValue: .forwards) 142 | public static let backwards = FillMode(rawValue: .backwards) 143 | public static let both = FillMode(rawValue: .both) 144 | public static let removed = FillMode(rawValue: .removed) 145 | #else 146 | typealias RawValue = String 147 | public static let forwards = FillMode(rawValue: kCAFillModeForwards) 148 | public static let backwards = FillMode(rawValue: kCAFillModeBackwards) 149 | public static let both = FillMode(rawValue: kCAFillModeBoth) 150 | public static let removed = FillMode(rawValue: kCAFillModeRemoved) 151 | #endif 152 | 153 | let rawValue: RawValue 154 | } 155 | 156 | public struct AnimationCanceller { 157 | let layer: CALayer 158 | let key: String 159 | 160 | public func cancelAnimation() { 161 | layer.removeAnimation(forKey: key) 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /TheAnimation/Source/AnimationGroup.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationGroup.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public final class AnimationGroup: Animation { 12 | public let key: String 13 | 14 | public var animation: CAAnimation { 15 | return _animation 16 | } 17 | 18 | public var animations: [Animation] { 19 | set { 20 | keys = newValue.map { $0.key } 21 | _animation.animations = newValue.map { $0.animation } 22 | } 23 | get { 24 | guard let animations = _animation.animations else { 25 | return [] 26 | } 27 | return animations.enumerated().map { offset, element in 28 | AnyAnimation(animation: element, key: keys[offset]) 29 | } 30 | } 31 | } 32 | 33 | private var keys: [String] = [] 34 | 35 | let _animation: CAAnimationGroup 36 | 37 | public init() { 38 | self._animation = CAAnimationGroup() 39 | self.key = "group" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /TheAnimation/Source/AnimationKeyPaths.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationKeyPaths.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | import CoreImage 11 | 12 | open class AnimationKeyPaths { 13 | fileprivate init() {} 14 | } 15 | 16 | public protocol AnimationValueType {} 17 | 18 | public final class AnimationKeyPath: AnimationKeyPaths { 19 | let rawValue: String 20 | 21 | public init(keyPath: String) { 22 | self.rawValue = keyPath 23 | } 24 | } 25 | 26 | extension Array: AnimationValueType {} 27 | extension Bool: AnimationValueType {} 28 | extension CALayer: AnimationValueType {} 29 | extension CATransform3D: AnimationValueType {} 30 | extension CGColor: AnimationValueType {} 31 | extension CGFloat: AnimationValueType {} 32 | extension CGPath: AnimationValueType {} 33 | extension CGPoint: AnimationValueType {} 34 | extension CGRect: AnimationValueType {} 35 | extension CGSize: AnimationValueType {} 36 | extension CIFilter: AnimationValueType {} 37 | 38 | extension AnimationKeyPaths { 39 | public static let anchorPoint = AnimationKeyPath(keyPath: "anchorPoint") 40 | public static let backgroundColor = AnimationKeyPath(keyPath: "backgroundColor") 41 | public static let borderColor = AnimationKeyPath(keyPath: "borderColor") 42 | public static let borderWidth = AnimationKeyPath(keyPath: "borderWidth") 43 | public static let bounds = AnimationKeyPath(keyPath: "bounds") 44 | public static let contents = AnimationKeyPath<[Any]>(keyPath: "contents") 45 | public static let contentsRect = AnimationKeyPath(keyPath: "contentsRect") 46 | public static let cornerRadius = AnimationKeyPath(keyPath: "cornerRadius") 47 | public static let filters = AnimationKeyPath<[CIFilter]>(keyPath: "filters") 48 | public static let frame = AnimationKeyPath(keyPath: "frame") 49 | public static let hidden = AnimationKeyPath(keyPath: "hidden") 50 | public static let mask = AnimationKeyPath(keyPath: "mask") 51 | public static let masksToBounds = AnimationKeyPath(keyPath: "masksToBounds") 52 | public static let opacity = AnimationKeyPath(keyPath: "opacity") 53 | public static let path = AnimationKeyPath(keyPath: "path") 54 | public static let position = AnimationKeyPath(keyPath: "position") 55 | public static let shadowColor = AnimationKeyPath(keyPath: "shadowColor") 56 | public static let shadowOffset = AnimationKeyPath(keyPath: "shadowOffset") 57 | public static let shadowOpacity = AnimationKeyPath(keyPath: "shadowOpacity") 58 | public static let shadowPath = AnimationKeyPath(keyPath: "shadowPath") 59 | public static let shadowRadius = AnimationKeyPath(keyPath: "shadowRadius") 60 | public static let sublayers = AnimationKeyPath<[CALayer]>(keyPath: "sublayers") 61 | public static let sublayerTransform = AnimationKeyPath(keyPath: "sublayerTransform") 62 | public static let transform = AnimationKeyPath(keyPath: "transform") 63 | public static let zPosition = AnimationKeyPath(keyPath: "zPosition") 64 | } 65 | 66 | extension AnimationKeyPaths { 67 | public static let anchorPointX = AnimationKeyPath(keyPath: "anchorPoint.x") 68 | public static let anchorPointy = AnimationKeyPath(keyPath: "anchorPoint.y") 69 | } 70 | 71 | extension AnimationKeyPaths { 72 | public static let boundsOrigin = AnimationKeyPath(keyPath: "bounds.origin") 73 | public static let boundsOriginX = AnimationKeyPath(keyPath: "bounds.origin.x") 74 | public static let boundsOriginY = AnimationKeyPath(keyPath: "bounds.origin.y") 75 | public static let boundsSize = AnimationKeyPath(keyPath: "bounds.size") 76 | public static let boundsSizeWidth = AnimationKeyPath(keyPath: "bounds.size.width") 77 | public static let boundsSizeHeight = AnimationKeyPath(keyPath: "bounds.size.height") 78 | 79 | } 80 | 81 | extension AnimationKeyPaths { 82 | public static let contentsRectOrigin = AnimationKeyPath(keyPath: "contentsRect.origin") 83 | public static let contentsRectOriginX = AnimationKeyPath(keyPath: "contentsRect.origin.x") 84 | public static let contentsRectOriginY = AnimationKeyPath(keyPath: "contentsRect.origin.y") 85 | public static let contentsRectSize = AnimationKeyPath(keyPath: "contentsRect.size") 86 | public static let contentsRectSizeWidth = AnimationKeyPath(keyPath: "contentsRect.size.width") 87 | public static let contentsRectSizeHeight = AnimationKeyPath(keyPath: "contentsRect.size.height") 88 | } 89 | 90 | extension AnimationKeyPaths { 91 | public static let frameOrigin = AnimationKeyPath(keyPath: "frame.origin") 92 | public static let frameOriginX = AnimationKeyPath(keyPath: "frame.origin.x") 93 | public static let frameOriginY = AnimationKeyPath(keyPath: "frame.origin.y") 94 | public static let frameSize = AnimationKeyPath(keyPath: "frame.size") 95 | public static let frameSizeWidth = AnimationKeyPath(keyPath: "frame.size.width") 96 | public static let frameSizeHeight = AnimationKeyPath(keyPath: "frame.size.height") 97 | } 98 | 99 | extension AnimationKeyPaths { 100 | public static let positionX = AnimationKeyPath(keyPath: "position.x") 101 | public static let positionY = AnimationKeyPath(keyPath: "position.y") 102 | } 103 | 104 | extension AnimationKeyPaths { 105 | public static let shadowOffsetWidth = AnimationKeyPath(keyPath: "shadowOffset.width") 106 | public static let shadowOffsetHeight = AnimationKeyPath(keyPath: "shadowOffset.height") 107 | } 108 | 109 | extension AnimationKeyPaths { 110 | public static let sublayerTransformRotationX = AnimationKeyPath(keyPath: "sublayerTransform.rotation.x") 111 | public static let sublayerTransformRotationY = AnimationKeyPath(keyPath: "sublayerTransform.rotation.y") 112 | public static let sublayerTransformRotationZ = AnimationKeyPath(keyPath: "sublayerTransform.rotation.z") 113 | public static let sublayerTransformScaleX = AnimationKeyPath(keyPath: "sublayerTransform.scale.x") 114 | public static let sublayerTransformScaleY = AnimationKeyPath(keyPath: "sublayerTransform.scale.y") 115 | public static let sublayerTransformScaleZ = AnimationKeyPath(keyPath: "sublayerTransform.scale.z") 116 | public static let sublayerTransformTranslationX = AnimationKeyPath(keyPath: "sublayerTransform.translation.x") 117 | public static let sublayerTransformTranslationY = AnimationKeyPath(keyPath: "sublayerTransform.translation.y") 118 | public static let sublayerTransformTranslationZ = AnimationKeyPath(keyPath: "sublayerTransform.translation.z") 119 | } 120 | 121 | extension AnimationKeyPaths { 122 | public static let transformRotationX = AnimationKeyPath(keyPath: "transform.rotation.x") 123 | public static let transformRotationY = AnimationKeyPath(keyPath: "transform.rotation.y") 124 | public static let transformRotationZ = AnimationKeyPath(keyPath: "transform.rotation.z") 125 | public static let transformScaleX = AnimationKeyPath(keyPath: "transform.scale.x") 126 | public static let transformScaleY = AnimationKeyPath(keyPath: "transform.scale.y") 127 | public static let transformScaleZ = AnimationKeyPath(keyPath: "transform.scale.z") 128 | public static let transformTranslationX = AnimationKeyPath(keyPath: "transform.translation.x") 129 | public static let transformTranslationY = AnimationKeyPath(keyPath: "transform.translation.y") 130 | public static let transformTranslationZ = AnimationKeyPath(keyPath: "transform.translation.z") 131 | } 132 | -------------------------------------------------------------------------------- /TheAnimation/Source/AnyAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnyAnimation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public final class AnyAnimation: Animation { 12 | public let animation: CAAnimation 13 | public let key: String 14 | 15 | init(animation: CAAnimation, key: String) { 16 | self.animation = animation 17 | self.key = key 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /TheAnimation/Source/BasicAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BasicAnimation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public typealias BasicAnimation = PrimitiveAnimation 12 | 13 | extension PrimitiveAnimation where RawAnimation == CABasicAnimation { 14 | public var fromValue: ValueType? { 15 | set { _animation.fromValue = newValue } 16 | get { return _animation.fromValue as? ValueType } 17 | } 18 | 19 | public var toValue: ValueType? { 20 | set { _animation.toValue = newValue } 21 | get { return _animation.toValue as? ValueType } 22 | } 23 | 24 | public var byValue: ValueType? { 25 | set { _animation.byValue = newValue } 26 | get { return _animation.byValue as? ValueType } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /TheAnimation/Source/Internal/CAAnimationDelegateProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimationDelegateProxy.swift 3 | // TheAnimation 4 | // 5 | // Created by 鈴木大貴 on 2020/01/21. 6 | // Copyright © 2020 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | final class CAAnimationDelegateProxy: NSObject, CAAnimationDelegate { 12 | 13 | var didStart: ((CAAnimation) -> Void)? 14 | var didStop: ((CAAnimation, Bool) -> Void)? 15 | 16 | func animationDidStart(_ anim: CAAnimation) { 17 | didStart?(anim) 18 | } 19 | 20 | func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { 21 | didStop?(anim, flag) 22 | } 23 | } 24 | 25 | private var delegateProxyAssociatedKey: UInt8 = 0 26 | 27 | extension CAAnimation { 28 | 29 | var delegateProxy: CAAnimationDelegateProxy { 30 | if let delegate = objc_getAssociatedObject(self, &delegateProxyAssociatedKey) as? CAAnimationDelegateProxy { 31 | return delegate 32 | } else { 33 | let delegate = CAAnimationDelegateProxy() 34 | objc_setAssociatedObject(self, &delegateProxyAssociatedKey, delegate, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 35 | self.delegate = delegate 36 | return delegate 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /TheAnimation/Source/KeyframeAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyframeAnimation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public typealias KeyframeAnimation = PrimitiveAnimation 12 | 13 | extension PrimitiveAnimation where RawAnimation == CAKeyframeAnimation { 14 | public var values: [ValueType] { 15 | return _animation.values?.compactMap { $0 as? ValueType } ?? [] 16 | } 17 | 18 | public var path: CGPath? { 19 | set { _animation.path = newValue } 20 | get { return _animation.path } 21 | } 22 | 23 | public var keyTimes: [TimeInterval] { 24 | return _animation.keyTimes?.map { $0.doubleValue } ?? [] 25 | } 26 | 27 | public var timingFunctions: [TimingFunction] { 28 | return _animation.timingFunctions?.compactMap(TimingFunction.init) ?? [] 29 | } 30 | 31 | public var calculationMode: CalculationMode { 32 | set { _animation.calculationMode = newValue.rawValue } 33 | get { return CalculationMode(rawValue: _animation.calculationMode) } 34 | } 35 | 36 | public var tensionValues: [CGFloat] { 37 | return _animation.tensionValues?.map { CGFloat($0.doubleValue) } ?? [] 38 | } 39 | 40 | public var continuityValues: [CGFloat] { 41 | return _animation.continuityValues?.map { CGFloat($0.doubleValue) } ?? [] 42 | } 43 | 44 | public var biasValues: [CGFloat] { 45 | return _animation.biasValues?.map { CGFloat($0.doubleValue) } ?? [] 46 | } 47 | 48 | public var rotationMode: RotationMode? { 49 | set { _animation.rotationMode = newValue?.rawValue } 50 | get { return _animation.rotationMode.map(RotationMode.init) } 51 | } 52 | 53 | public func add(value: ValueType, 54 | keyTime: TimeInterval, 55 | timingFunction: TimingFunction = .default, 56 | tensionValue: Double = 0, 57 | continuityValue: Double = 0, 58 | biasValue: Double = 0) { 59 | if let values = _animation.values { 60 | _animation.values = values + [value] 61 | } else { 62 | _animation.values = [value] 63 | } 64 | 65 | if let keyTimes = _animation.keyTimes { 66 | _animation.keyTimes = keyTimes + [NSNumber(value: keyTime)] 67 | } else { 68 | _animation.keyTimes = [NSNumber(value: keyTime)] 69 | } 70 | 71 | if let timingFunctions = _animation.timingFunctions { 72 | _animation.timingFunctions = timingFunctions + [timingFunction.rawValue] 73 | } else { 74 | _animation.timingFunctions = [timingFunction.rawValue] 75 | } 76 | 77 | if let tensionValues = _animation.tensionValues { 78 | _animation.tensionValues = tensionValues + [NSNumber(value: tensionValue)] 79 | } else { 80 | _animation.tensionValues = [NSNumber(value: tensionValue)] 81 | } 82 | 83 | if let continuityValues = _animation.continuityValues { 84 | _animation.continuityValues = continuityValues + [NSNumber(value: continuityValue)] 85 | } else { 86 | _animation.continuityValues = [NSNumber(value: continuityValue)] 87 | } 88 | 89 | if let biasValues = _animation.biasValues { 90 | _animation.biasValues = biasValues + [NSNumber(value: biasValue)] 91 | } else { 92 | _animation.biasValues = [NSNumber(value: biasValue)] 93 | } 94 | } 95 | } 96 | 97 | 98 | public struct CalculationMode { 99 | 100 | #if swift(>=4.2) 101 | typealias RawValue = CAAnimationCalculationMode 102 | public static let linear = CalculationMode(rawValue: .linear) 103 | public static let discrete = CalculationMode(rawValue: .discrete) 104 | public static let paced = CalculationMode(rawValue: .paced) 105 | public static let cubic = CalculationMode(rawValue: .cubic) 106 | public static let cubicPaced = CalculationMode(rawValue: .cubicPaced) 107 | #else 108 | typealias RawValue = String 109 | public static let linear = CalculationMode(rawValue: kCAAnimationLinear) 110 | public static let discrete = CalculationMode(rawValue: kCAAnimationDiscrete) 111 | public static let paced = CalculationMode(rawValue: kCAAnimationPaced) 112 | public static let cubic = CalculationMode(rawValue: kCAAnimationCubic) 113 | public static let cubicPaced = CalculationMode(rawValue: kCAAnimationCubicPaced) 114 | #endif 115 | 116 | let rawValue: RawValue 117 | } 118 | 119 | public struct RotationMode { 120 | 121 | #if swift(>=4.2) 122 | typealias RawValue = CAAnimationRotationMode 123 | public static let auto = RotationMode(rawValue: .rotateAuto) 124 | public static let autoaReverse = RotationMode(rawValue: .rotateAutoReverse) 125 | #else 126 | typealias RawValue = String 127 | public static let auto = RotationMode(rawValue: kCAAnimationRotateAuto) 128 | public static let autoaReverse = RotationMode(rawValue: kCAAnimationRotateAutoReverse) 129 | #endif 130 | 131 | let rawValue: RawValue 132 | } 133 | -------------------------------------------------------------------------------- /TheAnimation/Source/PrimitiveAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PrimitiveAnimation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public final class PrimitiveAnimation: Animation { 12 | public var animation: CAAnimation { 13 | return _animation 14 | } 15 | 16 | public let key: String 17 | 18 | let _animation: RawAnimation 19 | 20 | public var keyPath: AnimationKeyPath? { 21 | set { _animation.keyPath = newValue?.rawValue } 22 | get { return _animation.keyPath.map(AnimationKeyPath.init) } 23 | } 24 | 25 | public init(keyPath: AnimationKeyPath) { 26 | self._animation = RawAnimation(keyPath: keyPath.rawValue) 27 | self.key = keyPath.rawValue 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /TheAnimation/Source/PropertyAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PropertyAnimation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public typealias PropertyAnimation = PrimitiveAnimation 12 | 13 | extension PrimitiveAnimation where RawAnimation: CAPropertyAnimation { 14 | public var isAdditive: Bool { 15 | set { _animation.isAdditive = newValue } 16 | get { return _animation.isAdditive } 17 | } 18 | 19 | public var isCumulative: Bool { 20 | set { _animation.isCumulative = newValue } 21 | get { return _animation.isCumulative } 22 | } 23 | 24 | public var valueFunction: ValueFunction? { 25 | set { _animation.valueFunction = newValue.flatMap { $0.rawValue } } 26 | get { return _animation.valueFunction.flatMap(ValueFunction.init) } 27 | } 28 | } 29 | 30 | public struct ValueFunction { 31 | 32 | #if swift(>=4.2) 33 | typealias RawValue = CAValueFunctionName 34 | public static let rotateX = ValueFunction(name: .rotateX) 35 | public static let rotateY = ValueFunction(name: .rotateY) 36 | public static let rotateZ = ValueFunction(name: .rotateZ) 37 | public static let scale = ValueFunction(name: .scale) 38 | public static let scaleX = ValueFunction(name: .scaleX) 39 | public static let scaleY = ValueFunction(name: .scaleY) 40 | public static let scaleZ = ValueFunction(name: .scaleZ) 41 | public static let translate = ValueFunction(name: .translate) 42 | public static let translateX = ValueFunction(name: .translateX) 43 | public static let translateY = ValueFunction(name: .translateY) 44 | public static let translateZ = ValueFunction(name: .translateZ) 45 | #else 46 | typealias RawValue = String 47 | public static let rotateX = ValueFunction(name: kCAValueFunctionRotateX) 48 | public static let rotateY = ValueFunction(name: kCAValueFunctionRotateY) 49 | public static let rotateZ = ValueFunction(name: kCAValueFunctionRotateZ) 50 | public static let scale = ValueFunction(name: kCAValueFunctionScale) 51 | public static let scaleX = ValueFunction(name: kCAValueFunctionScaleX) 52 | public static let scaleY = ValueFunction(name: kCAValueFunctionScaleY) 53 | public static let scaleZ = ValueFunction(name: kCAValueFunctionScaleZ) 54 | public static let translate = ValueFunction(name: kCAValueFunctionTranslate) 55 | public static let translateX = ValueFunction(name: kCAValueFunctionTranslateX) 56 | public static let translateY = ValueFunction(name: kCAValueFunctionTranslateY) 57 | public static let translateZ = ValueFunction(name: kCAValueFunctionTranslateZ) 58 | #endif 59 | 60 | let rawValue: CAValueFunction? 61 | 62 | init(name: RawValue) { 63 | self.rawValue = CAValueFunction(name: name) 64 | } 65 | 66 | init(_ rawValue: CAValueFunction) { 67 | self.rawValue = rawValue 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /TheAnimation/Source/SpringAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SpringAnimation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public typealias SpringAnimation = PrimitiveAnimation 12 | 13 | extension PrimitiveAnimation where RawAnimation == CASpringAnimation { 14 | public var mass: CGFloat { 15 | set { _animation.mass = newValue } 16 | get { return _animation.mass } 17 | } 18 | 19 | public var stiffness: CGFloat { 20 | set { _animation.stiffness = newValue } 21 | get { return _animation.stiffness } 22 | } 23 | 24 | public var damping: CGFloat { 25 | set { _animation.damping = newValue } 26 | get { return _animation.damping } 27 | } 28 | 29 | public var initialVelocity: CGFloat { 30 | set { _animation.initialVelocity = newValue } 31 | get { return _animation.initialVelocity } 32 | } 33 | 34 | public var settlingDuration: TimeInterval { 35 | return _animation.settlingDuration 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /TheAnimation/Source/TimingFunction.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TimingFunction.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/12. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public struct TimingFunction { 12 | 13 | #if swift(>=4.2) 14 | typealias RawValue = CAMediaTimingFunctionName 15 | public static let `default` = TimingFunction(name: .default) 16 | public static let linear = TimingFunction(name: .linear) 17 | public static let easeIn = TimingFunction(name: .easeIn) 18 | public static let easeOut = TimingFunction(name: .easeOut) 19 | public static let easeInEaseOut = TimingFunction(name: .easeInEaseOut) 20 | #else 21 | typealias RawValue = String 22 | public static let `default` = TimingFunction(name: kCAMediaTimingFunctionDefault) 23 | public static let linear = TimingFunction(name: kCAMediaTimingFunctionLinear) 24 | public static let easeIn = TimingFunction(name: kCAMediaTimingFunctionEaseIn) 25 | public static let easeOut = TimingFunction(name: kCAMediaTimingFunctionEaseOut) 26 | public static let easeInEaseOut = TimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) 27 | #endif 28 | 29 | let rawValue: CAMediaTimingFunction 30 | 31 | init(name: RawValue) { 32 | self.rawValue = CAMediaTimingFunction(name: name) 33 | } 34 | 35 | init(_ rawValue: CAMediaTimingFunction) { 36 | self.rawValue = rawValue 37 | } 38 | 39 | public init(controlPoints c1x: Float, _ c1y: Float, _ c2x: Float, _ c2y: Float) { 40 | self.rawValue = CAMediaTimingFunction(controlPoints: c1x, c1y, c2x, c2y) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /TheAnimation/Source/TransitionAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionAnimation.swift 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import QuartzCore.CoreAnimation 10 | 11 | public final class TransitionAnimation: Animation { 12 | public var animation: CAAnimation { 13 | return _animation 14 | } 15 | 16 | public let key: String 17 | 18 | let _animation: CATransition 19 | 20 | public var type: TransitionType { 21 | set { _animation.type = newValue.rawValue } 22 | get { return TransitionType(rawValue: _animation.type) } 23 | } 24 | 25 | public var subtype: TransitionSubtype? { 26 | set { _animation.subtype = newValue?.rawValue } 27 | get { return _animation.subtype.map(TransitionSubtype.init) } 28 | } 29 | 30 | public var startProgress: TimeInterval { 31 | set { return _animation.startProgress = Float(newValue) } 32 | get { return TimeInterval(_animation.startProgress) } 33 | } 34 | 35 | public var endProgress: TimeInterval { 36 | set { return _animation.endProgress = Float(newValue) } 37 | get { return TimeInterval(_animation.endProgress) } 38 | } 39 | 40 | init() { 41 | self._animation = CATransition() 42 | self.key = "transition" 43 | } 44 | } 45 | 46 | public struct TransitionType { 47 | 48 | #if swift(>=4.2) 49 | typealias RawValue = CATransitionType 50 | public static let fade = TransitionType(rawValue: .fade) 51 | public static let moveIn = TransitionType(rawValue: .moveIn) 52 | public static let push = TransitionType(rawValue: .push) 53 | public static let reveal = TransitionType(rawValue: .reveal) 54 | #else 55 | typealias RawValue = String 56 | public static let fade = TransitionType(rawValue: kCATransitionFade) 57 | public static let moveIn = TransitionType(rawValue: kCATransitionMoveIn) 58 | public static let push = TransitionType(rawValue: kCATransitionPush) 59 | public static let reveal = TransitionType(rawValue: kCATransitionReveal) 60 | #endif 61 | 62 | let rawValue: RawValue 63 | } 64 | 65 | public struct TransitionSubtype { 66 | 67 | #if swift(>=4.2) 68 | typealias RawValue = CATransitionSubtype 69 | public static let right = TransitionSubtype(rawValue: .fromRight) 70 | public static let left = TransitionSubtype(rawValue: .fromLeft) 71 | public static let top = TransitionSubtype(rawValue: .fromTop) 72 | public static let bottom = TransitionSubtype(rawValue: .fromBottom) 73 | #else 74 | typealias RawValue = String 75 | public static let right = TransitionSubtype(rawValue: kCATransitionFromRight) 76 | public static let left = TransitionSubtype(rawValue: kCATransitionFromLeft) 77 | public static let top = TransitionSubtype(rawValue: kCATransitionFromTop) 78 | public static let bottom = TransitionSubtype(rawValue: kCATransitionFromBottom) 79 | #endif 80 | 81 | let rawValue: RawValue 82 | } 83 | -------------------------------------------------------------------------------- /TheAnimation/TheAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // TheAnimation.h 3 | // TheAnimation 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | #import "TargetConditionals.h" 10 | 11 | #if TARGET_OS_OSX 12 | #import 13 | #else 14 | #import 15 | #endif 16 | 17 | //! Project version number for TheAnimation. 18 | FOUNDATION_EXPORT double TheAnimationVersionNumber; 19 | 20 | //! Project version string for TheAnimation. 21 | FOUNDATION_EXPORT const unsigned char TheAnimationVersionString[]; 22 | 23 | // In this header, you should import all the public headers of your framework using statements like #import 24 | 25 | 26 | -------------------------------------------------------------------------------- /TheAnimationTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TheAnimationTests/TheAnimationTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TheAnimationTests.swift 3 | // TheAnimationTests 4 | // 5 | // Created by marty-suzuki on 2018/05/11. 6 | // Copyright © 2018年 marty-suzuki. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import TheAnimation 11 | 12 | class TheAnimationTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------