6
votes

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

enter image description here

This presents a full-screen view controller that only supports landscape:

enter image description here

Unfortunately during the transition, the status bar on the presenting view controller is removed, which makes the content jerk up before the transition begins. I've implemented a custom fade transition to make the effect obvious:

enter image description here

Note that the status bar is not present. This is done before the custom transition starts, with no animation, so even if I take a snapshot before the transition begins and add it to the container view, you still see the reduced navigation bar momentarily.

Is there a non-terrible way to fix this? I don't want to have to add the snapshot outside of the transition (like this answer).

I have tried making the presentation style custom instead of full-screen, but this doesn't leave the device in the portrait orientation. A solution using a custom presentation style which leaves the device in the landscape orientation would also be acceptable.

There is a sample project demonstrating the problem here

2
Hey! Did you figure out a valuable solution for this? Thanks.Lorenzo B
Same Problem over here. Any good solutions so far?Sebastian Boldt

2 Answers

0
votes

May be too horrible a hack but if it is the view jerking that bothers rather than the status bar disappearance itself could you change the constraints so that the top isn't constrained to the top layout guide but to the superview top with an appropriate constant?

0
votes

I might be missing something but does hiding the bar just before the transition look any better ?

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