複数のCAKeyframeAnimationオブジェクトがあり、それぞれに次のような一意のキーがあります。
.....
[myAnimation setValues:images];
[myAnimation setDuration:1];
....
[myLayer addAnimation:myAnimation forKey:@"unique key"];
私の質問は、このような複数のアニメーションがあり、それぞれに一意のキーがある場合、AnimationDidStopメソッドでそれらのキーを取得するにはどうすればよいですか?私はこのようなことをしたいです:
-(void)animationDidStop:(CAAnimation*)animation finished:(BOOL)flag{
if(..... ==@"uniquekey1"){
//code to handle this specific animation here:
}else if(.... ==@"uiquekey2"){
//code to handle this specific animation here:
}
}