0
如何在完成toValue過程後繼續執行UIImageView transform.translation.x動畫:例如:當按下按鈕#1時:從1到55,按下按鈕#2從55到110。 ...如果它在按鈕#2的位置,並且您單擊按鈕#5,然後從55 * 2到55 * 5。CABasicAnimation繼續從值
- (void)animateArrow{
CABasicAnimation *theAnimation;
theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
theAnimation.duration=0.4;
theAnimation.repeatCount=1;
theAnimation.toValue=[NSNumber numberWithFloat:50];
[buttonArrow.layer setValue:theAnimation.toValue forKey:theAnimation.keyPath];
[buttonArrow.layer addAnimation:theAnimation forKey:@"transform.translation.x"];
}
謝謝隊友。像魅力工作.. :) – 2014-01-27 05:29:45