gpt4 book ai didi

ios - CASSpringAnimation 的initialVelocity 的单位是什么?

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:20:59 26 4
gpt4 key购买 nike

CASpringAnimationinitialVelocity 属性的单位是什么?我认为它可能是:

  • 每秒点数或
  • abs(fromValue - toValue) 每秒

但似乎都不是这种情况(虽然我可能是错的)。

最佳答案

显然,它确实是每秒的总动画距离。这对应于类似方法 (https://developer.apple.com/documentation/uikit/uiview/1622594-animate) 中的 initialSpringVelocity 参数:

A value of 1 corresponds to the total animation distance traversed in one second. For example, if the total animation distance is 200 points and you want the start of the animation to match a view velocity of 100 pt/s, use a value of 0.5.

关于ios - CASSpringAnimation 的initialVelocity 的单位是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51088487/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com