How to change the frame rate of a core animation instance?

别等时光非礼了梦想. 提交于 2019-12-06 10:42:01

You don't have any inherent control over frame rate once you start your CABasicAnimation.

Probably the best way to achieve this would be to create multiple interpolations for a single animation (i.e. if you're moving 50 px down and 50px across, do 2 x 25px each) and induce an artificial sleep in your thread. Not a perfect solution, but will perhaps achieve slightly better results that you're seeing.

Be aware that this technique will have different framerates on different CPUs, and is therefore not generally recommended. Essentially, YMMV.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!