Hero: [Bug] Modal transitions stopped working after first hero transition
What did you do?
I use the following to display a VC with a modal transition:
self.present(vc, animated: true) {}
What did you expect to happen?
I expect the normal behavior of IOS 13:

However, this only works before using a Hero transition at another place in the app the first time!
What happened instead?
As soon as I have used Hero Transition the first time elsewhere in the app, the same modal transition behaves like this:

From this point, all modal transitions in the app behave like this.
Any ideas? Thanks in advance!
-
Hero Version: 1.5.0
-
iOS Version(s): 13.2
-
Swift Version: 5.0
-
Devices/Simulators: Both
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 14
- Comments: 24
I’m experiencing the same issue, is there a known workaround for it?
I would prefer not to have to remove Hero from my project but it is currently blocking me from updating to SDK 13 properly 😕
Any solution?
Okay I think I’ve got a solid work around:
I found differences of view hierarchy before/after using Hero modal. the position of UIDimmingView is different.
View hierarchy of normal modal (not Hero) before using hero modal
View hierarchy of normal modal (not Hero) after using hero modal
Here is screenshot list. the highlighted view is UIDimmingView
Any hint as to why this happen so I could analyze the source code? I’m perfectly OK in not using hero on the flows I need native pageSheet/formSheet presentations, but if you use Hero anywhere else it will break all future native modals.