开发者

CAKeyframeAnimation on complete

I have several CAKeyframeAnimation objects in my class.

They all have self as the delegate.

In my animationDidStop function, how can I tell where the call is coming from?

Is there any variable I can pass to CAKeyfameAnimation like an animationID or something?

Tha开发者_如何学Gonks,

Tee


You can use Key-Value coding to set values for arbitrary keys (keys need not be defined in advance) for a CAAnimation object.

For example, you can set a value for a key @"tag" for each CAAnimation object as the following:

CAAnimation oneOfYourAnimations = [CAAnimation animation];
[oneOfYourAnimations setValue:@"dropAnimation" forKey:@"tag"];

Later, you can read the value of each object as the following:

[anAnimation valueForKey:@"tag"]; //will return @"dropAnimation" if it's the previous animation
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜