开发者

How would I implement animation along a path using the iPhone SDK?

i am developing game application for iphone.In my application there is one object(fly).In my application this object move straight forwared using animation but i want to move object realistic开发者_运维问答.so path should be curve.please advice me about my question.

Edit:how can I create path with arc like flying an object from one place to another using curves...?


For example code that performs an animation along a curved path, you can consult my answer to this question. As Till suggests, you'll want to use a CAKeyframeAnimation with a Core Graphics curved path set to the animation's path property.


I created a tutorial that includes a working example of animating a view object (a UImageView) along a curved path, and posted it on GitHub. You can find it here:

Core Animation demo

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜