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