【发布时间】:2014-07-13 02:51:50
【问题描述】:
我试图弄清楚如何在动画发生时改变动画的速度。 将不胜感激任何帮助。
例如,我有一个想要从一端移动到另一端的对象(image1)。我已经实现了UIViewAnimationOptionCurveEaseOut 让动画开始快,然后在结束时减速,问题是速度的变化,从快到慢,几乎看不到,有人可以帮我弄清楚如何结束动画的速度比默认的UIViewAnimationOptionCurveEaseOut 慢得多,这是我正在使用的代码示例。
UIImageView *image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"theImage.png"]];
image1.frame = CGRectMake(0, 300, 50, 50);
[UIView animateWithDuration:1.0f
delay:0.0f
options: UIViewAnimationOptionCurveEaseOut
animations:^(void) {
image1.frame = CGRectMake(700, 300, 50, 50);
}
completion:NULL];
【问题讨论】:
标签: ios objective-c uiview core-animation