Core Animation

2 Jul 2013

SMSquashView

Bringing cartoon-style squash and stretch to iOS views, automatically. The layer tracks its own velocity and distorts along the direction of travel — no configuration needed, volume stays constant.

4 Mar 2013

Spatter and Spark

Shipping a kids’ storybook app with rich animation and a custom framework under the hood. Built on top of our Goodnight Safari codebase, with artist-driven XML animation specs and a parent-facing progress dashboard.

27 Aug 2012

Premature Completion: An Embarrassing Problem

Core Animation runs your completion block early if it doesn’t find any animations. Rude. Includes a sample project to poke at the behavior yourself and avoid hours of confused debugging.

16 Mar 2012

SMShadowedLayer

A CALayer subclass that fakes realistic lighting and shadows during Core Animation. Uses Lambert illumination math and a custom animatable property to keep shading correct mid-transform, specular highlights included.

5 Oct 2011

Mistakes Were Made: Integral Bounds

Non-integral CALayer bounds don’t just look blurry — they actually chop off pixels. A forensic look at CATextLayer backing stores, with screenshots and sample code to prove it.

29 Aug 2011

CALayer Internals: Contents

Why CALayer’s contents property is typed as id, and the neat trick that makes possible. Spoiler: you can clone a layer’s contents — even a CABackingStore — without ever touching a CGImageRef.

24 Aug 2011

CALayer’s Parallel Universe

The view on screen isn’t the view your code talks to. Here’s what Core Animation is really doing. Learn about the model/presentation layer split and how to use presentationLayer to animate from a view’s actual on-screen position.

27 Jul 2011

CALayers v. CGLayers, or, Which Layer, Player?

CALayer and CGLayer sound related. They’re not. Here’s why you should ignore CGLayer on iOS. A quick breakdown of what each layer type actually does and why CGLayer’s desktop advantages don’t carry over.