Question

My problem is:

I have a CAShapeLayer named outCircle. I add some CATextLayers as sublayers of outCircle. The problem is that when I'm pinching outCircle and doing so scale it, the sublayer CATextLayers resize too (maybe obvious) and become blurry and not crisp. The text looks horrible!

So I want to keep the original size and (maybe) position of the text layers yet keeping them sublayers of outCircle.

  • Is it possible?
  • How can I do it?

One solution is to not make the CATextLayers sublayers of outCircle but for various reasons I need to do it. Thanks for your help in advice!

Was it helpful?

Solution

try setting the inverse-scale value to textLayers. i.e if you set scale of .5 to shapeLayer, set (1/.5 =2) as scale to textLayers.

shapeLayer.affineTransform =CGAffineTransformMakeScale(.5, .5);
textLayer.affineTransform =CGAffineTransformMakeScale(2, 2);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top