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:
}
}