我正在尝试找到一种以这种方式为两个 View 设置动画的方法:它们将在不同的时间开始动画,但同时结束动画。
想象一下赛马,一匹马在另一匹马之后出发,但它们同时到达终点线。
它不是分组动画。另外,如何告诉动画等到某个时间才开始?
有人知道如何做到这一点吗?
TIA
最佳答案
使用[UIView animateWithDuration:delay:options:animations:completion:]
示例:
[UIView animateWithDuration:1.0f animations:^{
// first animation code here
}];
[UIView animateWithDuration:0.5f delay:0.5f options:UIViewAnimationCurveEaseIn animations:^{
// second animation code here
} completion:^(BOOL finished) {
}];
关于ios - 对具有不同开始时间和相同结束时间的两个 View 进行动画处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9625304/