【发布时间】:2014-11-16 00:15:00
【问题描述】:
我想要在屏幕上按顺序移动几张图像,每张图像都有特定的延迟。我已经像这样为第一张图片设置了动画:
[UIView animateWithDuration:0.5f
animations:^{
image1.center = CGPointMake(image1.center.x + 10.0f, image1.center.y);
}
completion:nil];
现在我想将 image2 移到 image 1 后面。我必须为 image2 添加延迟吗?我的意思是,我希望 image2 跟随 image1 在屏幕上移动。我该怎么做?
P.S:上面的代码将 image1 从左向右移动,穿过屏幕。
【问题讨论】:
-
将图像放入数组中,对其进行迭代并以指定的持续时间对其进行动画处理,这可能会解决您想要实现的目标。
标签: ios uiimageview uiimage core-animation quartz-core