我正在旋转45度的箭头。动画结束时,箭头返回到原始状态(0度)。我需要箭头不会回到原始状态,它会在动画结束时旋转45度。旋转动画
CABasicAnimation *fullRotationShort = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
fullRotationShort.fromValue = [NSNumber numberWithFloat:0];
fullRotationShort.toValue = [NSNumber numberWithFloat:M_PI/28*4.7];
fullRotationShort.duration = 1.0f;
fullRotationShort.repeatCount = 1;
[imgViewArrowShort.layer addAnimation:fullRotationShort forKey:nil];
这是行不通的。 – Sveta 2012-04-16 11:53:31
哦,我忘记了一些行.....你再次检查.. ?? – userar 2012-04-16 11:55:24
谢谢!有用! – Sveta 2012-04-16 11:57:37