0

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!

4

1 回答 1

3

尝试将反比例值设置为 textLayers。即,如果将 0.5 的比例设置为 shapeLayer,请将 (1/.5 =2) 设置为 textLayers 的比例。

shapeLayer.affineTransform =CGAffineTransformMakeScale(.5, .5);
textLayer.affineTransform =CGAffineTransformMakeScale(2, 2);
于 2014-01-26T13:08:26.037 回答