When my app is started while the user is in a phone call, the whole app is pushed down below the green Phone-call-bar. The root of my app is a UITabViewController
and the Tabs now appear partly below the Screen. The worst part of it is that after the phone call is ended, the view now takes up full screen space, but the Tab Bar is still partly below the screen! The even more strange thing is that when the app is started and the user receives a phone call or leaves the app, makes one and return to the app while the call is active, it resizes as expected. (So this only occurs when starting the app from scratch while a call is active)
The only post I could see regarding this was How In-Call status bar impacts UIViewController's view size?
One of the answers suggested changing the Autoresizing mask:
public override func viewDidLoad() {
super.viewDidLoad()
self.view.autoresizingMask = .flexibleHeight
}
In my UITabBarController
, but it changed nothing.
Another answer suggested setting wantsFullScreenLayout
to false
, which is default for regular UIViewControllers
but not for UITabBarControllers
. However this property was deprecated in iOS 7 and it suggests using edgesForExtendedLayout
and extendedLayoutIncludesOpaqueBars
instead.
I don't find enough information there to understand how I should solve this problem. Does anyone have an idea?
Note: It would be quite explanatory with some images, but I cannot post those because it's not released now