作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
出于各种原因,我使用 CADisplayLink
手动制作动画:
- (void)update:(CADisplayLink *)sender;
{
// Linearly interpolate proportion animated based on elapsed time
CGFloat proportion = ...
[self updateAnimationForProportion:proportion];
}
我想要一个 UIViewAnimationOptionCurveEaseInOut
而不是线性计算。
或者更好的是,是否可以使用基于 iOS7 物理的动画?
[UIView animateWithDuration:0.5 delay:0.0
usingSpringWithDamping:0.5
initialSpringVelocity:0.5
options:0 animations:^{ ... } completion:nil];
最佳答案
看来不可能。
如果它能帮助任何希望在 iOS 中使用缓动曲线的人,我从 jquery.easing.1.3 中获取了这个方便的缓动曲线列表,并将它们移植为可在 C 中作为一个简单的头文件(、C++、Objective-C、等):
关于ios - 有没有办法利用自定义动画的 CoreAnimation 完成曲线数学?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22897204/
我是一名优秀的程序员,十分优秀!