Search code examples
objective-ciosipadcore-animationcalayer

Fastest way to render hundreds of ellipses, constantly updating, on ipad?


The two approaches I'm thinking of are

1) One CALayer per dot 2) One CALayer drawing all of the dots

As I use the accelerometer, the dots all change color. I'm using a timer to update the colors, and have overridden drawInContext to draw the current color (interpolation of two colors).


Solution

  • For hundreds, I would draw to one layer (or flip between two) for efficiency. If that isn't smooth enough, OpenGL is the next option to look into.