1
喜亚姆简单amimation应用工作中,我执行下面的代码如何在iPhone停止CAKeyFrameAnimation目前
CGMutablePathRef path = CGPathCreateMutable();
// CGPathMoveToPoint use to move position
CGPathMoveToPoint(path, NULL, 160, 90);
//move image to state x Axes Right
CGPathAddLineToPoint(path, NULL,-30, 90);
animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.path = path;
CFRelease(path);
animation.duration = 15.0;
animation.repeatCount = 0;
animation.rotationMode = kCAAnimationPaced;
animation.removedOnCompletion = YES;
[[ballImageView1 layer] addAnimation:animation forKey:@"zposition"];
但我的问题是,每当动画完成,然后anmation停止FUNC