Presented viewController doesnt deinit when dismissing
hurtado-truelogic opened this issue · comments
Carlos H. Montenegro commented
What did you do?
- Created a new ViewController through storyboard.
- Activated Hero (
isHeroEnabled = true
) - presented the view through UIKit
present()
method, `animated = true - Presented correctly`
- Dismissed the view using
Hero.shared.defaultAnimation = .fade
andhero_dismissViewController()
What did you expect to happen?
- The view controller to be dismissed AND removed from memory running the
deinit{}
method
What happened instead?
- On next presentation, it presents the view controller at the exact same state as before.
General Information
-
Hero Version: 1.5.0
-
iOS Version(s): 14.2
-
Swift Version: 5
-
Devices/Simulators: Simulator (iPhone 8)
-
Reproducible in Examples? (Yes/No): No
Raku Xaster commented
Seems that when dismiss is performing, it will assign you dismissing viewController in Hero.shared. fromViewController (in HeroTransition.swift). I use unwind more than dismiss, so modify source code and clean Hero.shared. fromViewController after everything done is ok for me.
Hope it will help you