github HeroTransitions/Hero 0.1.0
HUGE Update. Revamped Hero Modifier implementation. Bug fixes.

latest releases: 1.6.3, 1.6.2, 1.6.1...
7 years ago
  • add HeroModifier class and HeroTargetState struct

    • HeroModifier is a swift enum-like class that provides the same functionality of the original string-based heroModifiers.
    • HeroTargetState is a struct that holds view state informations. It can be build from [HeroModifier]. Mostly used internally and for building HeroPlugin.
  • change the original heroModifiers:String? to heroModifierString:String? (breaking change!)

  • add heroModifiers:[HeroModifier]? to UIView

  • add a shared singleton Hero object for controlling the interactive transition. Which can be accessed by Hero.shared

  • few changes to the protocols

    • protocol HeroAnimator

      func temporarilySet(view:UIView, to modifiers:HeroModifiers)
      // to 
      func temporarilySet(view:UIView, targetState:HeroTargetState)
    • protocol HeroViewControllerDelegate

      @objc optional func wantInteractiveHeroTransition(context:HeroInteractiveContext) -> Bool
      // to
      @objc optional func wantInteractiveHeroTransition() -> Bool
    • remove HeroInteractiveContext protocol

  • update HeroPlugin to conform to the new protocols definitions.

  • rename a few modifiers:

    • curvetimingFunction
    • sourceIDsource
    • clearSubviewModifiersignoreSubviewModifiers
  • fix a bug with heroReplaceViewController API. PR 30

  • fix a bug with UIStackView not animating correctly. PR 22

  • add recursive ignoreSubviewModifiers modifier

  • add radial & inverseRadial cascade:

To migrate from previous versions:

Do a whole-project find & replace(cmd+option+shift+F) for:

  • heroModifiersheroModifierString

  • curvetimingFunction

  • sourceIDsource

  • clearSubviewModifiersignoreSubviewModifiers

    Remember to also replace these inside the storyboard. In code, please migrate to the new type-safe heroModifiers. It provides better type-checking and more functionality.

Don't miss a new Hero release

NewReleases is sending notifications on new releases.