These are code examples for the book iOS Core Animation Advanced Techniques written by Nick Lockwood, include code examples from Chapter 1 to Chapter 9.
Recently, I'm reading the book. I think I should write some code. So I copy and paste the easy part from the book to Xcode, and write the hard part bodily after I understand well. Gradually, I accumulate these code examples.
.
├── 1 The Layer Tree
│ └── BlueLayer
├── 2 The Backing Image
│ ├── CALayerDelegate
│ ├── LayerContent
│ └── Sprite
├── 3 Layer Geometry
│ ├── AnchorPoint
│ ├── Clock
│ ├── ContainsPoint
│ ├── ContentsCenter
│ └── ZPosition
├── 4 Visual Effects
│ ├── DropShadows
│ ├── GroupOpacity
│ ├── LCDClock
│ ├── LayerMask
│ ├── RoundedCorners
│ ├── ShadowClipping
│ └── ShadowPath
├── 5 Transforms
│ ├── CompoundTransform
│ ├── Cube
│ ├── OppositeRoationAroundY
│ ├── OppositeRotationAroundZ
│ └── SublayerTransform
├── 6 Specialized Layers
│ ├── AVPlayerLayer
│ ├── CAEAGLLayer
│ ├── CAEmitterLayer
│ ├── CAGradientLayer
│ ├── CAReplicatorLayer
│ ├── CAScrollLayer
│ ├── CAShapeLayer
│ ├── CATextLayer
│ ├── CATiledLayer
│ ├── CATransformLayer
│ ├── LayerLabel
│ ├── Reflection
│ ├── RichText
│ └── TileCutter
├── 7 Implicit Animations
│ ├── ActionForLayer
│ ├── CustomAction
│ ├── LayerActions
│ ├── PresentationLayer
│ └── Transactions
├── 8 Explicit Animations
│ ├── AnimateTransform
│ ├── AnimateUITabBarController
│ ├── AnimationDidStop
│ ├── AnimationGroup
│ ├── CABasicAnimation
│ ├── CAKeyframeAnimation
│ ├── CATransition
│ ├── CancelAnimation
│ ├── Clock
│ ├── CustomTransition
│ ├── TransformRotation
│ └── UIBezierPath
├── 9 Layer Time
│ ├── DurationAndRepeatCount
│ ├── ManualAnimation
│ ├── SwingingDoor
│ └── TimeOffsetAndSpeed
└── README.md
65 directories
You can open CoreAnimationCode.xcworkspace
to see all projects in one workspace.
CAEmitterCell:
timeOffset & speed test:
Manual Animation:
Custome Transition: