Commit 5e8497db by Daniel Dahan

issue-940: Fixed an issue where the TransitionController was not executing the…

issue-940: Fixed an issue where the TransitionController was not executing the lifecycle functions for the initial rootViewController.
parent ca07d0c1
## 2.12.8
* [issue-940](https://github.com/CosmicMind/Material/issues/940): Fixed an issue where the `TransitionController` was not executing the lifecycle functions for the initial `rootViewController`.
## 2.12.7
* [pr-938](https://github.com/CosmicMind/Material/pull/938): An expansion on this PR to fix the lifecycle issues with transitions.
......
......@@ -112,6 +112,26 @@ open class TransitionController: UIViewController {
prepare()
}
open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
rootViewController.beginAppearanceTransition(true, animated: animated)
}
open override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
rootViewController.endAppearanceTransition()
}
open override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
rootViewController.beginAppearanceTransition(false, animated: animated)
}
open override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
rootViewController.endAppearanceTransition()
}
open override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
layoutSubviews()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment