I have a UIView subclass that draws a bunch of bezier paths (typically around 10-20 of them). Currently I have a single CALayer doing all the drawing. Now I would like to be able to animate all the line widths individually. I was thinking about using a bunch of CAShapeLayers, each of them drawing just one of the bezier paths. CAShapeLayer has a lineWidth property that is animatable.
I got this idea from this post: Animating Pi Slices using a Custom CALayer.
My concern is whether this would require 10-20 times the memory for drawing, because each of the CAShapeLayers would create a separate drawing context, or if they would all draw into the same context and share memory?