How to do a curve/arc animation with CAAnimation?

前端 未结 5 655
离开以前
离开以前 2021-01-30 09:35

I have an user interface where an item get deleted, I would like to mimic the \"move to folder\" effect in iOS mail. The effect where the little letter icon is \"thrown\" into t

5条回答
  •  囚心锁ツ
    2021-01-30 10:00

    I have had a bit similar question several days ago and I implemented it with timer, as Brad says, but not NSTimer. CADisplayLink - that is the timer which should be used for this purpose, as it is synchronized with the frameRate of the application and provides smoother and more natural animation. You can look at my implementation of it in my answer here. This technique really gives much more control on animation than CAAnimation, and is not much more complicated. CAAnimation can't draw anything since it doesn't even redraw the view. It only moves, deforms and fades what is already drawn.

提交回复
热议问题