我想做一些图形元素消失,移动背景图像并出现新的。问题是在背景移动动画完成之前出现新的背景移动。我没有在相关问题中看到一个好的答案,所以我会很感激任何帮助。伪代码:
-(void)method1 {
[UIView animateWithDuration:0.6
delay:0.0 options:UIViewAnimationOptionCurveEaseIn
animations:^{
self.setThisOne.hidden = YES;
self.setThisAnother.hidden = YES;
}completion:^(BOOL finished) {
[UIView animateWithDuration:0.6
delay:0.3
options: UIViewAnimationOptionCurveEaseIn
animations:^{ self.background.frame = myFrame; //Move background image
} completion:^(BOOL finished){
if (finished) {
[self method2];
}
}
];
}];
}
-(void)method2 {
[UIView animateWithDuration:0.2
delay:0.3
options: UIViewAnimationOptionBeginFromCurrentState
animations:^{
self.aButtonsAppear.hidden = NO;
self.moreElementsApeear.hidden = NO
} completion:nil];
}