【发布时间】:2010-12-04 13:08:28
【问题描述】:
嗨,我目前正在使用简单的 amimation 应用程序,我在其中实现以下代码
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"];
但我的问题是,每当动画完成时,动画就会停止功能
【问题讨论】:
标签: iphone iphone-sdk-3.0 core-animation