Theocacao
Leopard
Design Element
Comment on "Core Animation Isn't Just for Animation"
by Ben Barnett — Oct 03
You're absolutely right on how many layers can be onscreen and still get high performance. I used CA for a scatter plot view, with each point, and each axis mark (ie. horizontal & vertical lines) being a separate layer. There are about 900-1100 points, and 20 lines.

This way, when you change the label for an axis (eg. from day of month to month of year), the lines and points can animate smoothly to their new positions. The hit testing is incredibly easy too, even for overlapping layers.
Back to "Core Animation Isn't Just for Animation"
Design Element

Copyright © Scott Stevenson 2004-2015