我希望在动画完成后执行doSomethingElse。另一个限制是动画代码的持续时间可能不同。我该怎么做?谢谢!
-(void) doAnimationThenSomethingElse {
[self doAnimation];
[self doSomethingElse];
}
举个例子,这个不起作用:
animationDuration = 1;
[UIView animateWithDuration:animationDuration
animations:^{
[self doAnimation];
} completion:^(BOOL finished) {
[self doSomethingElse];
}
];