把动画代码放到 block 动画中执行?
[UIView animateWithDuration:1.0 animations:^{
self.countDownView.center = CGPointMake(self.view.center.x, self.view.center.y - 150);
} completion:^(BOOL finished) {}
];
放进 completion 是可以保证顺序执行 但是动画一多嵌套会很深,看起来也不方便。
如果只在 animation 中写,动画会同时执行。
有啥解决办法么?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
设置delay
也可以试试组动画
放到一个group里