In my iOS app, I am modally presenting a View Controller (AVPlayerViewController, in this case) using a transition.
At the start of the transition, the Status Bar disappears instantly and yanks up the contents of the app in an ugly jerk, before the animation (of whatever kind--crossfade, cover vertical) hides the underlying stack of view controllers. The new modally presented VC has a status bar on it.
I'd like to not have the status bar vanish at the start of the modal presentation animation.
I set up a blank project and mocked the same basic structure of my app, and when a view controller is presented, the status bar remains stationary during the transition.
What would cause the status bar to vanish at the start of a modal presentation animation?
(Tested on iOS 11 on iPhone X and iOS 10/9 on simulators.)
EDIT:
To perform the presentation, the root view controller of the app is listening for a notification and calling, roughly:
let vc = AVPlayerViewController()
// configure the player
self.present(vc, animated: true) {
vc.player?.play()
}
This is what produces the odd vanishment.
Interestingly, when I go into the Storyboard and set up a Modal Segue (to a blank view controller) from that same root view controller, triggered off a randomly-added-button, the resultant transition is smooth.
Another data point is that when I turn off animation in present(:animated:completion:)
the status bar stays put until the modal is covering it.