Reputation: 14123
I have created a universal app and it shows a blank white screen on startup. The initial view controller does not load. I have done trying all the alternatives suggested :
- Set launch image source to Asset Catalog in General settings and removing launch screen file. (This shows a black screen)
- Set Main interface (It was already set)
- No missing constraint in the view.
- Set
self.window?.makeKeyAndVisible()
indidFinishLaunchingWithOptions
- Set the ViewController as Initial view controller in Storyboard (It was already set).
How I might get out of this trouble ?
I am adding the screenshot of my project settings just in case.
Here is a screenshot of my initial view controller in storyboard :
Upvotes: 3
Views: 3136
Reputation: 2719
The images showed in launch.storyboard
should locate in the project directly, or a folder in the project.
Use the image as xxx.png
, then the IOS splash screen is normal.
The images showed in launch.storyboard
is not seen for splash screen, when located in Assets.xcassets/xxx.imageset
Upvotes: 0
Reputation: 3831
Update the Launch Images in General Settings
Set the "Launch screen file" is blank.
Upvotes: 0
Reputation: 14123
Got the issue. Actually it is nothing wrong with what I am doing. The issue is in viewDidLoad code :
view_padding = UIView.init(frame: CGRectMake(0, 0, 25, 30))
username.leftView = view_padding
username.leftViewMode = .Always
password.leftView = view_padding
password.leftViewMode = .Always
Not sure why but will figure it out.
Upvotes: 0