Skip to content

1.2.0

Compare
Choose a tag to compare
@lkzhao lkzhao released this 12 Apr 03:26
· 151 commits to master since this release
  • add HeroTransitionDelegate for observing transition state and progress

  • add ability to change target state during interactive transition.
    #322

    Just call the following method before calling finish(animate:) and provide the target state similar to apply(modifiers:, to:)

    Hero.shared.changeTarget(modifiers:, to:)

    for example:

    someView.hero.modifiers = [.translate(x: 100)]
    
    // when you want to finish interactive transition
    Hero.shared.changeTarget(modifiers:[.translate(x: -100)], to: someView)
    Hero.shared.finish()
    // this will animate someView to the state of `.translate(x: -100)` instead of `.translate(x: 100)`
  • a number of bug fixes and improvements: