C4Shape, setFrame does not resize the form (C4Framework)

I play with C4 and can not understand why my figures do not come to life. If I create a form like this:

self.theShape = [C4Shape ellipse:CGRectMake(100, 100, 2, 2)];

... and call later

[theShape setFrame:CGRectMake(200, 200, 50,50)];

The form does not resize. The implementation suggests that it should, but I do not see it. Is there something I'm doing wrong? Is it because I am not updating the canvas?

+3
source share
1 answer

In C4, calling setFrame:a C4Shape object will not scale it.

The reason is that changing the frame of the CAShapeLayer view will not change the basic shape of the bezier ... Unlike invoking the same thing in the image. UIKit will scale images and other content, but will not scale beziers (as far as I know) ...

So, if it is rect, call:

[theShape rect:aNewFrame]

, :

[theShape ellipse:aNewFrame]

, Core Animations .

+1

All Articles