I am implementing game application.In which i am using layer for animation.
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, previousValuex, previousValue);
CGPathAddLineToPoint(path, NULL, valuex, value);
previousValue=value;
previousValuex=valuex;
CAKeyframeAnimation *animation;
animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.path = path;
animation.duration =1.0;
animation.repeatCount = 0;
//animation.rotationMode = kCAAnimationRotateAutoReverse;
animation.calculationMode = kCAAnimationPaced;
// Create a new layer for the animation to run in.
CALayer *moveLayer = [imgObject layer];
[moveLayer addAnimation:animation forKey:@"position"];
Now i want to find layer position during animation?Is it possibel?please help me.
I’ve never tried to do this, but you should be able to (perhaps via KVO?) monitor the CALayer’s
frameproperty (orposition, orbounds, oranchorPoint, depending on what you need) during the animation.