VC in TabBarcontroller built against ios13sdk and a storyboard

I have an app live on the store and my iPhone is running on iOS13 GM seed, the app looks exactly as i would expect. Not done any changes to make it work with iOS13. However if i build via xcode on to a device or simualtor from the same released branch the UI is different. I'm confused and obviously missing something.

So the biggest problem is the viewcontrollers in my tabbarcontroller there's the black space at the the top which would suggest there may be modal however there just standard view controllers in a tabBarController. And the lifecycle events are NOT (viewWillAppear etc...) called now either which makes me think that there seen as modal as well.

Any pointers as to why this might be happening would be very helpful indeed. Like i say the one on the app store is completely fine. But the exact same build from xcode looks wrong.

So i know it's because i'm building against the iOS13 SDK, And a lot has changed around modals etc.. My TabBarcontroller is created via a storyboard, I'm looking at changing it over to code to play with fixing this issue, however if anyone has any tips on how i get it back to how it was previously without chnaging my implementation to code that would be a big help.

Replies

I remember reading (but cannot find what exactly and where) that some defaults behavior settings have changed.


May be it's in release notes for XCode11


Interface Builder

New Features


UIViewController instances now default to the Automatic modal presentation mode. Modal presentation segues can override this setting. (48129590)


See also

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


So, try to change in ViewController:

var modalPresentationStyle: UIModalPresentationStyle { get set }

to fullScreen or any other that suits you better.


Take also care on how you call present (if you use):

https://stackoverflow.com/questions/41594465/how-to-present-a-modal-view-on-top-of-tab-bar-controller


Hope that helps.

Thanks for the reply. I've dug a little deeper and i do think i have a better understanding of my issue. I now think it's something to do with how i'm styling various screens. I'm basically adding and removing the window to update the UIAppearance style on my viewcontroller. Removing and adding in iOS12 and below used to trigger the Lifecycle functions but doesn't now. So i need to shift some code around to trigger the actions i had sat in these methods. It's an unfortunate side effect to the iOS13 upgrade but i guess these can happen.

hi,jet. is there any solutions later. I have the same problems in iOS13, the first viewcontroller in the tabbarcontroller can not trigger "viewdidappear" or "viewdiddisappear" at cold launch. However, once I switch the tab, the lifecycle of the first vc can be triggered.