Re: CA: How to wait for an animation to finish?
Re: CA: How to wait for an animation to finish?
- Subject: Re: CA: How to wait for an animation to finish?
- From: Jens Alfke <email@hidden>
- Date: Sun, 16 Mar 2008 10:59:37 -0700
On 16 Mar '08, at 10:15 AM, I wrote:
It would be, if I had a CAAnimation object. But I don't. All I did
was something like "layer.position = newPos". That creates an
implicit animation behind the scenes, but I don't see any way to get
the object corresponding to that animation, so I have no way of
tracking its progress.
After some experimenting I found that setting the "position" property
of a layer sets an animation for the "position" key; so you can
retrieve it by calling [layer animationForKey: @"position"]. But
that's an undocumented implementation detail that could change in the
future, so I don't want to rely on it. (There is no "animations"
property that would let me get all the current animations on the
layer.) Worse, the CAAnimation retrieved from that key has somehow
been made read-only, so attempting to set its delegate (so I can be
informed when it finishes) throws an exception.
The relationship between implicit and explicit animations seems very
confusing, and I can't find any documentation of it. I'm fighting my
way through this by trial and error...
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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