Animating multiple colors in C4

104 views Asked by At

I would like to animate the color of a shape object to turn from one color to another color and then back again. I tried to set the color of my object with one method and then set it back to the original color with another method, but this seems rather cumbersome to me. Is there a better way to do this using C4?

1

There are 1 answers

0
C4 - Travis On

You're right, the approach you're taking is cumbersome.

To animate forward and immediately back again, you can use the following line of code:

object.animationOptions: AUTOREVERSE;
object.fillColor = [UIColor ...];

To do this forever:

object.animationOptions: AUTOREVERSE | REPEAT;
object.fillColor = [UIColor ...];

... furthermore, you can use these animation options for ALL animated properties of any visible object in C4. So, you can autoreverse / repeat origin changes, center points, changing shapes, changing images, etc...