• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CAAnimation - Letting it run without stopping when new animation is activated
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CAAnimation - Letting it run without stopping when new animation is activated


  • Subject: Re: CAAnimation - Letting it run without stopping when new animation is activated
  • From: Matt Long <email@hidden>
  • Date: Fri, 20 Mar 2009 17:07:55 -0600

Use animation grouping. I you use groups, set beginTime with your offset for each animation's time to start. The duration of each animation must be the full duration of the entire animation put together end to end. Your group animation should also have the same duration. Here's some pseudo code.

[animation1 setDuration:15];
[animation1 setBeginTime:0];

[animation2 setDuration:15];
[animation2 setBeginTime:5];

[animation3 setDuration:15];
[animation3 setBeginTime:10];

[animationGroup setDuration:15];
[animationGroup setAnimations[NSArray arrayWithObjects:animation1, animation2, animation3, nil]];


[layer addAnimation:animationGroup forKey:nil];

hth,

-Matt



On Mar 20, 2009, at 4:45 PM, Filip van der Meeren wrote:

Good evening (for me it is ;-) ),

I am trying to make a cool visual effect, to allow for this I need to be able to start a CAAnimation for a CALayer positioning and keep it running until it is done...

And here comes the tricky part, it needs to run even when other animations are activated within the same layer. The animations are triggered at different moments in time, I have tried to find a solution. But each time the animation stops when another is activated.

Any help here is welcome...

Thank you,

Filip van der Meeren
email@hidden
http://sourceforge.net/projects/xlinterpreter

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: CAAnimation - Letting it run without stopping when new animation is activated
      • From: Filip van der Meeren <email@hidden>
References: 
 >CAAnimation - Letting it run without stopping when new animation is activated (From: Filip van der Meeren <email@hidden>)

  • Prev by Date: Re: NSDate isEqual to...
  • Next by Date: Re: CAAnimation - Letting it run without stopping when new animation is activated
  • Previous by thread: CAAnimation - Letting it run without stopping when new animation is activated
  • Next by thread: Re: CAAnimation - Letting it run without stopping when new animation is activated
  • Index(es):
    • Date
    • Thread