画像の繰り返し回転アニメーションを作成していますが、すべて ipod4/iphone4/iphone4S で期待どおりに動作します。ただし、iphone3G で同じコードを使用すると、画像が約 5 倍速く回転します。回転には 1 秒かかります。
CABasicAnimation *fullRotation;
fullRotation = [CABasicAnimation
animationWithKeyPath:@"transform.rotation"];
fullRotation.fromValue = [NSNumber numberWithFloat:0];
fullRotation.toValue = [NSNumber numberWithFloat:(2*M_PI)];
fullRotation.duration = 1.0;
fullRotation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
fullRotation.repeatCount = 999999999;
// Add the animation group to the layer
[rotateImageView.layer addAnimation:fullRotation forKey:@"rotateAnimation"];
iphone 3G には iOS4.2.1 があり、残りのデバイスには 4.3/5.0/5.1 があります。iOS のバージョンを確認してこれを修正することを考えています。4.3 未満の場合は、期間を 5 秒程度にするだけではなく、3G で良さそうです...残念ながら、これが正しい修正であるかどうかはわかりません。 .
そこで何が起こっているのか、適切な修正は何ですか?