0

iPhone/iPad アプリを作ろうとしていますが、現在、画像をゆっくりと 360 度回転させようとしています。しかし、アニメーションの長さを長くすると、画像が 1/4 回転し、アニメーションの最初に戻ります。

誰がこれの何が悪いのか教えてもらえますか?

私がこれまでに持っているもの:

CABasicAnimation *fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
[fullRotation setFromValue:[NSNumber numberWithFloat:0]];
[fullRotation setToValue:[NSNumber numberWithFloat:((2*M_PI))]];
fullRotation.speed = .5f;
fullRotation.duration = 5.5;
fullRotation.repeatCount = 1;

fullRotation.repeatCount = HUGE_VALF;

[[cosmic layer] addAnimation:fullRotation forKey:@"transform.rotation"];
4

1 に答える 1

1

コードから次の 1 行を削除するだけです。

fullRotation.speed = .5f;

必要な期間を調整します。

于 2013-05-20T19:35:27.703 に答える