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:
- The SplashScreen.storyboard is set in the target settings (good question).
- This happens both on real devices and in simulator BUT NOT ALWAYS.
- I am not doing any networking (synchronous or otherwise) in this stage
- The blackout seems to happen only when transitioning to one specific view
- The code for the view's viewWillDisplay and such executes even when blacked out, just nothing VISIBLE is displayed
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?
