ios - 有没有办法改变动画速度?

标签 ios ios-animations hero

在 iOS swift 中我使用 HeroTransition制作动画的库。有没有办法改变动画速度?

let vc = DODViewController.init(with: project , projectType: .doodle, needToMapFolderIndex: nil)
            
let heroId = "newcontentscanvas1"
cell.hero.id = heroId
vc.hero.isEnabled = true
vc.view.hero.id = heroId
self.present(vc, animated: true, completion: nil)

最佳答案

您可以向英雄组件添加修饰符。对于您的情况,可以按如下方式完成,

cell.hero.modifiers = [.duration(0.8)]

有关详细信息,请检查存储库上的以下问题 #464

关于ios - 有没有办法改变动画速度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68992566/

相关文章:

animation - 使用 SwiftUI 动画列表中的行更改

ios - CAShapeLayer,使用事务设置动画路径

ios - 我什么时候需要调用 -[UIViewController initWithNibName :bundle:]?

ios - 有没有一种快速的方法来确定 iPhone 型号是否比某个型号更新?

ios - 如何使用 Interface Builder 设置 UIScreenEdgePanGestureRecognizer?

ios - 将 NSDictionary 从 json 结果保存到 NSUserDefaults 返回 "attempt to insert non-property list object"错误

ios - Swift spring 动画在 UITableViewCell 上无法正常工作