Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presented viewController doesnt deinit when dismissing #693

Open
hurtado-truelogic opened this issue Jan 8, 2021 · 1 comment
Open

Presented viewController doesnt deinit when dismissing #693

hurtado-truelogic opened this issue Jan 8, 2021 · 1 comment

Comments

@hurtado-truelogic
Copy link

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 and hero_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

@rxvincent
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants