0

CAAnimation を使用して、アプリでビュー コントローラーを切り替えようとしています。これら2つの特定のView Controllerを切り替えると、アニメーションは必要ありません。これは可能ですか?もしそうなら、どうすればこれを達成できますか?

ありがとう!

4

1 に答える 1

1

期間を0に設定するのはどうですか:

BOOL shouldAnimate = // here you set your condition whether to animate or not
CFTimeInterval standartDuration = 1.0;

CAAnimation *animation = [CAAnimation animation];
animation.duration = shouldAnimate ? standartDuration : 0.0;
于 2011-09-29T20:58:26.760 に答える