可能重复:
How can I animate the movement of a view or image along a curved path?的UIView动画不是线性
我有我要动画落叶(或几个)iOS应用程序。我在我的ImageView
叶形象,我已经从文档想出了一个简单的动画:
[UIView animateWithDuration:4.0f
delay:0
options:UIViewAnimationTransitionFlipFromLeft
animations:^(void)
{
leaf1ImageView.frame = CGRectMake(320, 480, leaf1ImageView.frame.size.width,leaf1ImageView.frame.size.height);
}
completion:NULL];
这将使叶子从起始位置到右下角的一条直线。我该如何使它像一条抛物线或正弦曲线一样遵循路径或曲线,甚至可以旋转图像或视图?这会在动画块中完成吗?提前致谢!
谢谢。这非常有帮助。 – chis54
但是,如果我使用这个,我无法获得UIView动画的位置。 –