iOS 13 and NavigationBar size

We are currently having an issue with navigation bar sizing when using modal presentation in iOS 13.


In most cases this works fine as can be seen in this screenshot:

However, in a few screens we get this weird effect, with the navigation bar having a lower height and a weird "see-through" gap between it and the view. As seen in this screenshot:

Both of the view controllers have the same values set for their properties, are modally presented and have the same constrains on their subviews (0 spacing from the superview/margins/top layout guide).

This issue doesn't happen in iOS 12, even when built with the iOS 13 SDK. Is this a known issue in iOS 13 (beta 8), or is there something we should adjust in the code/storyboard?

Replies

When we lookk at the screenshot of the problem, it appears the navbar is dimensioned for the view that is stacked behind (smaller width and a few pixels above).


In the first (correct) screenshot, we see the view behind has a title. Not in the other.


How different are the views behind ?


In fact, I would guess this may come from the way IOS 13 handles UIModalPresentationAutomatic:

"Defaults to UIModalPresentationAutomatic on iOS starting in iOS 13.0, and UIModalPresentationFullScreen on previous versions"


Try changing the presentation to UIModalPresentationFullScreen and see what happens.


Read this for details:

h ttps://medium.com/@hacknicity/view-controller-presentation-changes-in-ios-13-ac8c901ebc4e

The view controllers are set to formsheet, not automatic. Setting the presentation style to fullscreen does solve the issue but also gets rid of the "sheet" effect. I rather have the new formsheet or pagesheet styles and those keep having the little gap between the view and the bar.

I have uploaded a test project demonstrating the issue: https://we.tl/t-ojnTek5t7X

@TTAppDev I'm experiencing the same issue. Did you find a workaround and/or file a bug report?

Unfortunately I did not find a workaround to get it working in a "Formsheet/PageSheet" presentation style. I adjusted the controllers to be "Fullscreen" to close the gap, but I still rather utilize the Form Sheet or Page Sheet styles.
I have filed a bug report to Apple. Hopefully they can find and solve the issue.

The workaround here https://forums.developer.apple.com/message/378841 worked for me!

Salem issue when presenting form sheet over another morally presented auto or form sheet. .overContext kind of solves it but I want to know what is causing this gap and awkward sizing of navigation bar.