-
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?
toheroModifierString:String?
(breaking change!) -
add
heroModifiers:[HeroModifier]?
to UIView -
add a shared singleton
Hero
object for controlling the interactive transition. Which can be accessed byHero.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:
- curve → timingFunction
- sourceID → source
- clearSubviewModifiers → ignoreSubviewModifiers
-
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:
-
heroModifiers → heroModifierString
-
curve → timingFunction
-
sourceID → source
-
clearSubviewModifiers → ignoreSubviewModifiers
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.