HeroTransitions / Hero

Elegant transition library for iOS & tvOS
https://HeroTransitions.github.io/Hero/
MIT License
22.06k stars 1.73k forks source link

iOS 14 not working transitions on debug mode #684

Closed rickrvo closed 3 years ago

rickrvo commented 4 years ago

What did you do?

Updated to Xcode 12

What did you expect to happen?

The same code that was working to still work.

What happened instead?

People with the production version who updated to ios14 is working fine. But now just building the same project with xcode 12 Transition is not working. This line currentRoot.hero.replaceViewController(with: root) doesn't replace the viewController anymore

Flows.whenReady(flow1: flow) { [weak self] root in
            root.hero.isEnabled = true
            root.hero.modalAnimationType = fadeAnimation ? .fade : .none
            if let currentRoot = self?.window?.rootViewController {
                let delay = addDelay ? 0.2 : 0
                DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
                    print("REPLACING - \(step.self)")
                    Hero.shared.cancel(animate: false)
                    currentRoot.hero.replaceViewController(with: root)
                }
            } else {
                self?.window?.rootViewController = root
                self?.window?.makeKeyAndVisible()
            }
        }
        return .one(flowContributor: .contribute(withNextPresentable: flow,
                                                 withNextStepper: OneStepper(withSingleStep: step)))

General Information

Demo Project

Sorry, not allowed :/

JoeMatt commented 3 years ago

This should be working now in 1.6.0.

Can you please confirm?