我正在旋轉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