UIView animateWithDuration等待,直到动画完成
答
巢它的UIView的animateWithDuration包装的,像这样完成的变化:
[UIView animateWithDuration:1.00 animations:^{
//animate first!
}
completion:^(BOOL finished) {
[UIView animateWithDuration:1.00 animations:^{
//animate the second time.
}];
}];
或者只设置一个动画从它继续与这个当前状态:
[UIView animateWithDuration:1.00
delay:0.00
options:UIViewAnimationOptionBeginFromCurrentState
animations:^{
//animate
}
completion:^(BOOL finished){
}];
答
我总是连锁我动画与此:
[self performSelector:@selector(animationDone) withObject:nil afterDelay:1.0];
太棒了!感谢那个漂亮的小解决方案。 – JFS 2013-06-26 20:17:14