Reputation: 1872
I'm trying to present a nav controller (within a vc) as a modal like so:
let myNavController = UINavigationController(rootViewController: someVc)
self.present(myNavController, animated: true)
I'm noticing that it isn't full screen ... the status bar area is black on my 5S device, and on iPhoneX there is similar black space at the top.
It seems like the modal snugs up against the bottom of the status bar's area.
Is there something I need to do to set this space to white? i.e. adjust the status bar style? Extend edge settings?
5S:
iPhoneX:
Upvotes: 0
Views: 407
Reputation: 1872
It seems that the UINavigationController.navigationBar was being set to "transparent"!
self.navigationController?.navigationBar.isTranslucent = false
^ fixed the issue!
Upvotes: 1