Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animating multiple colors in C4

Tags:

ios5

c4

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?

like image 400
Jman078 Avatar asked Feb 25 '26 03:02

Jman078


1 Answers

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...

like image 70
C4 - Travis Avatar answered Mar 02 '26 11:03

C4 - Travis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!