0

画像の回転に問題があります。

CATransform3DMakeRotation(M_PI, 0, 0, -1.0)レイヤーを使用してアニメーションを作成すると、画像を回転させると鋸歯状の(揺れる)画像が表示されます。

backgroundView が別のアニメーション ビューに追加されます (backgroundView と同じですが、方向が逆になります)。

コードは次のとおりです。

CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI , 0, 0, -1.0)];
animation.duration = 30;
animation.cumulative = YES;
animation.repeatCount = INT_MAX;
[backgroundView.layer addAnimation:animation forKey:@"animationOne"];

お時間をいただきありがとうございます。

4

1 に答える 1

0

回転時に画像のギザギザを削除できる機能を使用する問題を修正しました。

[self.layer setShouldRasterize:YES];
于 2011-07-26T03:30:50.387 に答える