I don't know what is happening : with every simulator and even with my iPhoneX, the UIScreen.main.bounds
are (0.0, 0.0, 320.0, 480.0)
.
Here's what I put in my AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow()
let vc = LoginViewController()
let navigationController = UINavigationController(rootViewController: vc)
self.window?.rootViewController = navigationController
self.window!.makeKeyAndVisible()
navigationController.setNavigationBarHidden(true, animated: false)
return true
}
I've done that way for years now, and suddenly it doesn't work, especially on that app. What's going on?
edit: Here's the result
Solution : Don't remove the LaunchScreen.storyboard, the UIScreen.main bases its bounds on that…