I have a UIScrollView with CAShapeLayer sub layer that renders a simple line. The CAShapeLayer sublayer has its own sub CAShapeLayer. This causes scrolling and zooming to be slow. The hierarchy is like this:
-UIScrollViewLayer -CAShapeLayer -CAShapeLayer
If I change this the hierarchy so that it is only one level deep I do not have performance issues:
-UIScrollViewLayer -CAShapeLayer -CAShapeLayer
What am i doing wrong?