Tencent / QMUI_iOS

QMUI iOS——致力于提高项目 UI 开发效率的解决方案
http://qmuiteam.com/ios
Other
7.08k stars 1.38k forks source link

关于options:QMUIViewAnimationOptionsCurveOut如何生效 #1240

Closed liuzhaozhen closed 3 years ago

liuzhaozhen commented 3 years ago

示例代码:[UIView animateWithDuration:.15 delay:0.9 options:QMUIViewAnimationOptionsCurveOut animations:^{..];

在上述代码中使用到了QMUIViewAnimationOptionsCurveOut (7<<16),我个人不太明白QMUIViewAnimationOptionsCurveOut是如何工作的。

demo中并没有重写animateWithDuration,然后系统为何能识别QMUIViewAnimationOptionsCurveOut这个值呢。 非常感谢。

MoLice commented 3 years ago

这是系统的私有 API,效果不是由 QMUI 实现的,是系统自己实现,内部会用 Spring Animation,所以 duration 此时是无效的,不管你填 0.15 还是 1.5,实际都是 0.25。