iosios-animationshero

Is there a way to change animation speed?


In iOS swift I use HeroTransition library to make animations. Is there a way to change animation speed?

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)

Solution

  • You can add a modifier to the hero component. In your case, it can be done as follows,

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

    for more info check the following issues on the repo #464