I am using a Launch Screen storyboard as well as a Main storyboard in my Swift app. Sometimes the app will show the launch storyboard and then go to a black screen. Other times it correctly goes to the Main storyboard entry point. It almost seems like it is build-dependent in that if I clean and rebuild a few times, a build pop out that behaves properly. Any ideas what may be causing this?
To add some clarification:
This might help: I put in the following code in the offending view:
override func viewDidAppear(animated: Bool) {
print(self.view.layer.bounds.width);
print(self.view.layer.bounds.height);
}
When the black screen issue occurs, I get 260 and 17. When the view presents correctly, I get the 5s (simulator) dimensions of 320 and 568. Does that help anyone help me?
One of the reasons behind the Android phone black screen won't turn on is the incompatible apps you have installed on your device. So, to fix the black screen problem, all you need to do is get rid of incompatible applications and programs from your Android device in safe mode.
iPhone screen stuck black with a white Apple logo? If the iPhone screen goes black but shows a white Apple logo before returning to normal, this indicates the device is rebooting. If that happens out of the blue, it usually suggests the iPhone is crashing or an app is crashing which causes the device reboot.
I was faced with the same issue in my device. I managed to fix it by setting the application's main interface via xcode: MyApplication → Main Interface → LaunchScreen.storyboard
(or Main.storyboard
).
Cheers! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With