Open logananderson opened 4 years ago
Did you set hero.isEnabled = true
at targetViewController?
I did. Sorry my example repo was pointing to the wrong code. I pushed the right project.
I set hero.isEnabled = true
on the navigation controller, current viewcontroller, and the one being pushed.
GitHubContribute to logananderson/HeroIssueExample development by creating an account on GitHub.
What did you do?
In my project, there are a series of UIViewControllers that all share a common background UIImageView. Using Hero, I set
navigationController?.hero.isEnabled = true
. Then I set theheroId
of the imageView that contains the same image from each ViewController.I then call
pushViewController
What did you expect to happen?
I would expect the background image to persist during the transition, but for the other elements to be replaced in the slide animation.
What happened instead?
This does happen, however UIViews that have their backgroundColor set lose their backgroundColor and become clear during the transition.
If I remove the hero identifiers on the background imageView, the UIButton and UITextField's act as expected, retaining their backgroundColor.
General Information
Hero Version: 1.5.0
iOS Version(s): 13.4
Swift Version: 5
Devices/Simulators: iPhone 11 Pro Simulator, iPhone 11 Pro
Reproducible in Examples? (Yes/No): Yes
Demo Project
https://github.com/logananderson/HeroIssueExample