From simple VC to VC as root of NavigationController
Hi, I can't find how can I make a simple transition with a navigationController in the middle of two VCs:
- I have a "firstVC" who is not part of a NavigationController
- This VC performs a segue to a navigation controller who has a "secondVC" as root
- In my "firstVC" I have an UIImageView with
heroIdset to "logoImage" - In my "secondVC" I added a UIImageView to titleView property of the navigationItem
let image = UIImageView(image: UIImage(named: "logo")!)
image.heroID = "logoImage"
navigationItem.titleView = image
I set too navigationController.isHeroEnabled = true and the same property is set to true in my "firstVC" and "secondVC"
However when the segue is triggered, nothing happens. I'm not sure if I'm missing something
Thanks in advance
@jpv123: I have a similar issue. My VCs that contain the views that I want to animate are inside two different NavigationControllers: VC1 -> NavigationController (has VC2 as root) Would the transition only work for VCs that inside the same NavigationController?
@andreipt Hi guys, I'm in the same case... i think it's a simple scenario!!! J
@jpv123 Hi,
I resolved this to navigationController.isHeroEnabled = true for this case
VC1 -> NavigationController (has VC2 as root).
Bye J
@jpv123 Hi,
I resolved this to
navigationController.isHeroEnabled = truefor this case VC1 -> NavigationController (has VC2 as root).Bye J
This recommendation works, I'm also using this setup for on my projects.