1
键我有多个CAKeyframeAnimation对象,每一个类似下面的唯一关键:检索CAKeyframeAnimationKey在AnimationDidStop
.....
[myAnimation setValues:images];
[myAnimation setDuration:1];
....
[myLayer addAnimation:myAnimation forKey:@"unique key"];
我的问题是,如果我有多个动画像这样和每一个独特的关键,如何我是否在方法AnimationDidStop中检索它们的键?我希望能够做到这样的事情:
-(void)animationDidStop:(CAAnimation*)animation finished:(BOOL)flag{
if(..... [email protected]"uniquekey1"){
//code to handle this specific animation here:
}else if(.... [email protected]"uiquekey2"){
//code to handle this specific animation here:
}
}