-1
我想在視圖上有動畫,它會在x上右2像素,在x上左2像素。UIView動畫移動和返回
我有這樣的不透明度,和我期待來調整這使得它,
CABasicAnimation *theAnimation;
theAnimation=[CABasicAnimation animationWithKeyPath:@"opacity"];
theAnimation.duration=1.0;
theAnimation.repeatCount=HUGE_VALF;
theAnimation.autoreverses=YES;
theAnimation.fromValue=[NSNumber numberWithFloat:1.0];
theAnimation.toValue=[NSNumber numberWithFloat:0.3];
[image.layer addAnimation:theAnimation forKey:@"animateOpacity"];
兩點,而不是兩個像素。 – 2014-09-29 18:55:29
@robmayoff更新 – 2014-09-29 18:57:01
謝謝,但我需要永遠重複。 – Curnelious 2014-09-29 19:01:31