Hero icon indicating copy to clipboard operation
Hero copied to clipboard

unwindToViewController not working in iOS 15

Open rued opened this issue 4 years ago • 3 comments
trafficstars

What did you do?

I have VC1 -> VC2 -> VC3 I use VC3.hero.unwindToViewController(VC1) to unwind.

What did you expect to happen?

With iOS 14 and earlier, this has been working fine, I see a smooth transition from VC3 -> VC1

What happened instead?

After upgrading to iOS 15, the unwind DO happen, but the animation is from VC3 -> VC3, and when done an instant switch to VC1.
debugger reports: 'Unbalanced calls to begin/end appearance transitions for VC3'

General Information

  • Hero Version: 1.6.1

  • iOS Version(s): iOS 15

  • Swift Version: Swift 5.5

  • Devices/Simulators: iPhone 12 Pro

  • Reproducible in Examples? (Yes/No): No

Demo Project

None

rued avatar Sep 28 '21 22:09 rued

I might add that I'm not using Navigation controllers.

VC2 & VC3 are opened using:

let controller = XXXViewController() // isHeroEnabled = true is set in viewDidLoad controller.modalPresentationStyle = .fullScreen controller.delegate = self controller.datasource = self controller.heroModalAnimationType = .selectBy(presenting:.slide(direction: .left), dismissing:.slide(direction: .right)) self.present(controller, animated: true)

rued avatar Sep 29 '21 09:09 rued

I have seen one more issue on iOS 15 with similar steps. I see a black screen when dismissing and I have attached example project as well - https://github.com/HeroTransitions/Hero/issues/721

varunpm1 avatar Oct 11 '21 09:10 varunpm1

I also encountered the same problem. How did you solve it?

LeonBiters avatar Sep 29 '22 08:09 LeonBiters