我正在使用 [UIView animateWithDuration:...]
来制作 UIImageView
View 的动画序列。像这样:
[UIView animateWithDuration:1.0 animations:^{
imageView.frame = newImageRectPosition;
}completion:^(BOOL finished){
//animate next UIImageView
}];
我需要动画“下一个 UIImageView”而不是完成。我需要在上一个动画的中间而不是完成时为“下一个 UIImageView”设置动画。有可能吗?
最佳答案
您可以设置两个 UIView 动画 block ,其中一个延迟为第一个动画持续时间的一半:
[UIView animateWithDuration:1.0
animations:^{ ... }
completion:^(BOOL finished){ ... }
];
[UIView animateWithDuration:1.0
delay:0.5
options:UIViewAnimationCurveLinear
animations:^{ ... }
completion:^(BOOL finished) { ... }
];
关于iphone - 在完成之前启动动画 UIView?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13016147/