The status bar is hidden when the terrain-only view controller is presented on top of the portrait-only view controller

I have a navigation controller containing a view controller that only supports portrait orientation:

enter image description here

Here's a full-screen controller that only supports landscape:

enter image description here

Unfortunately, during the transition, the status bar on the view controller is deleted, which forces the content to masturbate before the transition begins. I implemented a custom fade transition:

enter image description here

Please note that the status bar is missing. This is done before the start of the user transition without animation, so even if I take a picture before the transition and add it to the container view, you will still see a smaller navigation bar.

Is there a scary way to fix this? I don't want to add a snapshot beyond the transition (e.g. this answer ).

I tried to style the presentation style instead of full-screen, but this does not leave the device in portrait orientation. A solution using a custom presentation style that leaves the device in landscape orientation is also acceptable.

There is an example project demonstrating the problem here

+6
source share
2 answers

Maybe it’s too terrible to crack, but if it is a look of annoyance that bothers, rather than the disappearance of the status bar, could you change the restrictions so that the top is not tied to the top layout guide, but to the top from the top using the corresponding constant?

0
source

Maybe something is missing for me, but hides the bar a little earlier than the transition looks better?

self.navigationController? navigationBarHidden = true in prepareForSegue and enable it back in viewWillAppear

0
source

All Articles