私はそのアニメーションの人間を作ります。だから私は、、、のための方法を持っていheadAnimationます。eyeAnimationearAnimationbodyAnimation
myAnimationすべてのアニメーションを呼び出すときにメソッドがあります。
その方法では、少し遅れてアニメーションを呼び出す必要があります。NSTimerとを使用せずにこれを作成するにはどうすればよいですかperformSelector。
アニメーションは、並列または直列にすることができます。では、アニメーションまたはブロックのキューを作成するにはどうすればよいですか?どこに遅延を送信し、どのメソッドを呼び出すことができますか?
編集
使用し[self performSelector:@selector(eyeAnimation) withObject:nil afterDelay: 2.0]ました。そして、すべてのメソッドアニメーションについてperformSelector。
すべてのアニメーションで、たとえばeye:
私は使用します[UIView animateWithDuration:duration
delay:delay options:UIViewAnimationOptionCurveEaseInOut
animations: completion:];。
だから今、私の-(void)myAnimation10performSelectorでは、さまざまな遅延があります。
それで、これをどのように実行できるかという問題です。
編集#2
[UIView animateWithDuration:0.0 delay:2 options:UIViewAnimationOptionCurveEaseInOut animations:^{
[self eyeAnimation];
} completion:^(BOOL finished) {
if (finished) {
[UIView animateWithDuration:0.0 delay:8 options:UIViewAnimationOptionCurveEaseInOut animations:^{
[self earAnimation];
} completion:^(BOOL finished) {
}];
[UIView animateWithDuration:0.0 delay:17 options:UIViewAnimationOptionCurveEaseInOut animations:^{
[self bodyAnimation];
} completion:^(BOOL finished) {
}];
}
}];
しかし、私が呼び出すとアニメーションが異なりますperformSelector。それらは平行ではありません。