複数の UIImageViews をアニメートして、ポイント A からポイント B に直線的に移動したいと考えています。
私はoptions:UIViewAnimationOptionCurveLinearを使用しています- Apple docs は次のように述べています。
私が使用しているコードは次のとおりです。
[UIView animateWithDuration:1.5
delay:0.0
options:UIViewAnimationOptionCurveLinear
animations:^{
//start animation of random grasses with const speed and const y
for (int i=0;i<45;i++){
if ([self.view viewWithTag:i+100]){
CGRect frameOfGrass = [self.view viewWithTag:i+100].frame;
frameOfGrass.origin.y = -100;
[self.view viewWithTag:i+100].frame = frameOfGrass;
}}
}
completion:^(BOOL finished){
//
}];
注: すべての imageView の Y 位置は、600 ~ 700 の乱数です。
しかし、結果はUIViewAnimationOptionCurveEaseOutのように見えます- 「イーズアウト カーブにより、アニメーションがすばやく開始され、完了するにつれて遅くなります。」エンディングですべての画像が遅くなるからです。
実行中のアプリのスクリーンショットは次のとおりです。
なぜこれが起こっているのですか?