Apple 的 UIViewAnimationCurveEaseInOut 的实际方程式是什么?
我试图用方程式无缝地弥补时间,虽然我看到了与我需要的类似的东西;我需要它更准确。
能够调用 UIKit 使用的实际缓动方程就足够了。
那么,UIKit animateWithDuration 使用的实际方程式是什么?
I'm trying to make something time up with the equation seamlessly, and while I see something similar to what I need; I need it to be more accurate.
It would suffice to be able to call the actual easing equation UIKit uses.
So, what is the actual equation that UIKit animateWithDuration uses?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
阅读
CAMediaTimingFunction
,特别是“预定义计时函数”常量。您可以输入函数常量
kCAMediaTimingFunctionEaseInEaseOut
作为[CAMediaTimingFunction functionWithName:]
的参数,然后尝试从中获取各个点的值,以了解它自己的作用。Read the documentation for
CAMediaTimingFunction
, in particular the "Predefined Timing Functions" constants. You can enter the function constantkCAMediaTimingFunctionEaseInEaseOut
as the parameter to[CAMediaTimingFunction functionWithName:]
, and then try getting values at various points from it to figure out what it does yourself.您可以阅读 Jeff Lamarche 关于动画曲线的启发性文章。他将他的过渡动画库发布到公共领域。如果您正在为自己的项目寻找灵感或起点,他还详细介绍了他所采取的方法并记录下来。
苹果的动画曲线没有记录。
文章链接(网络存档)
You might have a look at Jeff Lamarche's enlightening article on Animation Curves. He's released his transition animation library into the public domain. He's also detailed the approach he took and documented it, should you be looking for inspiration or a starting point for your own project.
Apple's animations curves are not documented.
Link to article (Web Archive)