Search code examples
iosc4

Zoom in animation - c4framework


I am playing with the deferent animations using the alpha C4 framework.

I am trying to shape grow from the midel of the canvas till it covers it completely....Is there any animation that can create that zoom effect?


Solution

  • Yup, you can change and animate a C4Shape like this:

    shape.animationDuration = 1.0f; //1 second animation duration
    [shape rect:(-1,-1,769,1025)];
    

    Note, the above is for a rectangle that will be 1px larger than the screen of an iPad on all sides. To make an ellipse you'd have to figure out the size of the frame that will encompass an ellipse that covers the whole screen.