2016-04-13 13 views
0

私は、カーブを簡単にしてたくさんのアニメーションを使用するアプリを持っています。 UIView animateWithDuration:delay:options:animations:completionUIViewアニメーション一部のアニメーションではカーブが機能しない

これらのすべてのアニメーションがOK取り組んでいるが、今私は内と飛び出し引き出しに1を追加しようとしている、といくつかの理由のために、この特定のアニメーションは常に線形である:私はすべてのケースで、この機能を使用する

[UIView animateWithDuration:2 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 
    self.activityBar.view.frame = CGRectMake(0, self.activityBar.view.frame.origin.y, self.activityBar.view.frame.size.width, 20); 
} completion:nil]; 

なぜこのアニメーションはリニアで、同じオプションを持つ他のアニメーションはカーブしていますか?

この

はOPではありません self.activityBar.view

-UIViewController 
-UIViewController 
    -UIViewController (animation code lives here) 
    -UIViewController (activityBar) 
    -UIView (activityBar.view) 

答えて

0
//Set old Frame for activityBar Here 

[UIView animateWithDuration:2.0 delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 
     [self.view layoutIfNeeded]; 
//Update to the new frame 
self.activityBar.view.frame = CGRectMake(0, self.activityBar.view.frame.origin.y, self.activityBar.view.frame.size.width, 20); 

    } completion:^(BOOL finished) { 

    }]; 
+0

self.viewのためのビュー階層であります... – Cbas

関連する問題