Search code examples
iosc4

Notification when animation ends in C4


When an animation completes in C4 does the object post a notification? I see endedNormally by C4Sample and reachedEnd by C4Movie. If I ask a shape to animate how can I get called when it completes?

Update

Here's a link to a gist with the solution implemented: https://gist.github.com/drart/5693291


Solution

  • At the moment there is no notification at the end of an animation. Your best bet is to run a method at a given interval you know will be after the animation, like so:

    obj.animationDuration = 1.0f;
    obj.fillColor = C4RED;
    [self runMethod:@"methodToRunAfterAnimationIsComplete"
         afterDelay:obj.animationDuration+.01f];