Hero: iOS 13, Page Sheet modal controller incorrect display.

Created on 25 Sep 2019  路  15Comments  路  Source: HeroTransitions/Hero

What did you do?

I add Hero library to my project, set isHeroEnabled on ViewControllers and set HeroID on views.
Add new modal controller with Page sheet.

What did you expect to happen?

I expect to happen views modification and transform on transition. In iOS 11-12 - all OK.
And I expect to happen in iOS 13, that I can see my modal view controller with default ios 13 dismiss swipe, top rounded and over previos view controller.
Something like this: https://prnt.sc/patp70

What happened instead?

But in iOS 13, I happened this: https://prnt.sc/pato7j
And swipe down for dismiss dont work.
This problem fixed, if I change presentation style to Full screen. But I want Page sheet presentation style.
How I can fix this?

General Information

  • Hero Version:
    1.4.0

  • iOS Version(s):
    iOS 13.0

  • Swift Version:
    5.0

  • Devices/Simulators:
    Simulator iPhone 11

Most helpful comment

Any progress on this topic? We also have problems working with modal view controllers.
Is support for .pageSheet and .formSheet planned at all?

All 15 comments

@StasanTelnov is the vc you're presenting a navigation controller? I have the exact same problem specifically with nav vcs.

@michalciurus, yes, I presenting a navigation controller.

https://github.com/HeroTransitions/Hero/issues/181

Might be connected to the fact that Hero doesn't support .pageSheet

Hero doesn't support .pageSheet
Set the "Presentation" property of the navigation controller to "Full Screen".

It seems to _kind_ of support .automatic but it's really buggy.

FullScreen works but it performs buggy due to the new presentation style from Apple

+1, the same for me, strange black bar at the top of the screen, but I'm using
present(controller, animated: true, completion: nil) with hero enabled.

+1, the same for me, strange black bar at the top of the screen, but I'm using
present(controller, animated: true, completion: nil) with hero enabled.

This is probably because your view controller presentation style is set to ".automatic", ".pageSheet", or ".formSheet". These presentation styles changed with the transition to iOS 13 and Hero is not yet optimized to handle them. Set your view controller's presentation style to ".fullScreen" in order to present it as you did in iOS 12 and earlier.

Set your view controller's presentation style to ".fullScreen"

Forgot about that, thanks a lot, it helped 馃憤

Any progress on this topic? We also have problems working with modal view controllers.
Is support for .pageSheet and .formSheet planned at all?

Any progress on this issue? i am facing same issue strange black bar at the top of the screen.

I have the same issue. It would be absolutely great if Hero would also support this type of modal styles...

remove transitioning delegate just after enabling hero, that's worked for me

navigationController.hero.isEnabled = true
navigationController.transitioningDelegate = nil

remove transitioning delegate just after enabling hero, that's worked for me

navigationController.hero.isEnabled = true
navigationController.transitioningDelegate = nil

This seems to work on iOS 13.5. Cheers.

remove transitioning delegate just after enabling hero, that's worked for me

navigationController.hero.isEnabled = true
navigationController.transitioningDelegate = nil

Does this work around work for anyone still on iOS 14 ? I'm presenting a VC that is not on a Navigation hierarchy with formSheet, and any of the hero transitions done on that app previously make it break

Was this page helpful?
0 / 5 - 0 ratings