我让那个有生命的人。所以我有headAnimation, eyeAnimation, earAnimation,的方法bodyAnimation。
myAnimation当我调用我所有的动画时,我有方法。
在那种方法中,我需要延迟调用动画。我怎样才能在不使用NSTimerand的情况下做到这一点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。它们不是平行的。