有你可以用它来实现你后的效果很多选择。想到的一点是定时器的使用。
使用一个NSTimer,其间隔为动画的一半,并让计时器触发另一个动画。只要这两个动画不会互相干扰,你应该没问题。
一个例子是像这样:
NSTimer* timer;
// Modify to your uses if so required (i.e. repeating, more than 2 animations etc...)
timer = [NSTimer scheduledTimerWithTimeInterval:animationTime/2 target:self selector:@selector(runAnimation) userInfo:nil repeats:NO];
[UIView animateWithDuration:animationTime animations:^{
imageView.frame = newImageRectPosition;
} completion:nil];
- (void)runAnimation
{
// 2nd animation required
[UIView animateWithDuration:animationTime animations:^{
imageView.frame = newImageRectPosition;
} completion:nil];
}
具有定时功能,这可能扩大,如果你需要做两个以上的动画,而这一切都粘在一起如果以后需要改变动画时间上。
开始另一个动画与0.5秒 – Felix
相关的延迟:http://stackoverflow.com/a/27609589/870028 – Johnny