I wanted to create a project without any storyboards.
I have deleted the Main and LaunchScreen storyboards.
As usual I added to my applicationDidFinishLaunchingWithOptions:
window = UIWindow(frame: UIScreen.main.bounds
window?.rootViewController = ViewController()
window?.makeKeyAndVisible()
Now in Project Settings -> General if I leave Launch Screen File empty UIScreen.main.bounds
is
(CGRect) $R12 = (origin = (x = 0, y = 0), size = (width = 320, height = 480))
And I get the following screen:
Now if I add something to the Launch Screen File
field, in Info.plist -> Information Property List a new line with key Launch screen interface file base name
appears and the bounds are correct. The bounds are correct even if the value is empty.
Why does the existence of Launch screen interface file base name
affect UIScreen bounds?