アプリでアニメーションを使用していて混乱します。アニメーションがデバイスで遅れているためです。シミュレーターではすべて問題ないようです。まずは使ってみた
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
そして、アニメーションをコミットする前に、「if」ブロックを含む約30行のコードがあったので、これが問題を引き起こす可能性があると思いましたが、使用を開始しました
[UIView animateWithDuration:0.3
delay:0.0
options: UIViewAnimationCurveEaseIn
animations:^{
mainView.frame = CGRectMake(0, 0, 320, 420);
buttonsView.transform = CGAffineTransformMakeTranslation(0, 68);
radioBar.transform = CGAffineTransformMakeTranslation(0, -50);
vk_controller.view.frame = CGRectMake(0, 0, 320, 440);
}
completion:^(BOOL finished){
button.isHiddenDown = YES;
}];
「if」ブロックに関してですが、ラグは残っているようです。ボタンを押すと、約 0.5 ~ 1 秒の遅延があり (なぜですか?)、アニメーションが開始されます。しかし、私がテーブルビューにいるとき
[UIView animateWithDuration:0.3
delay:0.0
options: UIViewAnimationCurveEaseIn
animations:^{
mainView.frame = CGRectMake(0, 0, 320, 420);
buttonsView.transform = CGAffineTransformMakeTranslation(0, 68);
radioBar.transform = CGAffineTransformMakeTranslation(0, -50);
goha_news_controller.view.frame = CGRectMake(0, 0, 320, 420);
goha_news_controller.feed_table.frame = CGRectMake(0, 0, 320, 420);
if(goha_news_controller.backgroundView)
{
goha_news_controller.backgroundView.frame = CGRectMake(0, 0, 320, 420);
goha_news_controller.newsDetailView.frame = CGRectMake(0, 0, 320, 420);
}
}
completion:^(BOOL finished){
button.isHiddenDown = YES;
}];
アニメーションの前の予期しない遅延に加えて、バーストのある過酷なアニメーションがあります。
なぜそれが起こるのか、どうすれば修正できるのか、誰でも説明できますか?