In Xcode 11 initial window is configured now in SceneDelegate, here my code and result on picture:
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
print("Scene willConnectTo.")
guard let windowScene = (scene as? UIWindowScene) else { return }
// window = UIWindow(frame: windowScene.coordinateSpace.bounds)
window = self.window ?? UIWindow()
let mainView = ViewController()
mainView.title = "TEST"
let navigationController = UINavigationController()
navigationController.viewControllers = [mainView]
window?.backgroundColor = .red
window?.windowScene = windowScene
window?.rootViewController = navigationController
window?.makeKeyAndVisible()
}
Can anyone suggest how to make view covering all screen ?