[英]iOS App- LaunchScreen.storyboard displays white on ios 14.2
I have Xcode version 12.0.1.我有 Xcode 版本 12.0.1。 I have run the app on simulator with ios 14, the launch screen working fine it shows the image I want to show(splash Screen), but when I run the app on real device which has ios 14.2 the launch screen just appeared to be white.
我已经使用 ios 14 在模拟器上运行了该应用程序,启动屏幕工作正常,它显示了我想要显示的图像(启动屏幕),但是当我在具有 ios 14.2 的真实设备上运行该应用程序时,启动屏幕似乎是白色的. can some one help me with this thanks in advance.
有人可以帮我提前谢谢。
Faced the same problem.面临同样的问题。 The issue was the size of the image used in the launch screen storyboard.
问题在于启动屏幕 storyboard 中使用的图像大小。 This lead to the whole launch screen just being black.
这导致整个启动屏幕都是黑色的。
Solution 1: What fixed it in our case was:解决方案 1:在我们的案例中解决的问题是:
The main reason is the larger image so just replace it with a smaller one.主要原因是图像较大,因此只需将其替换为较小的图像。
Solution 2: Place your splash screen image outside the Images.xcassets folder.解决方案 2:将初始屏幕图像放在 Images.xcassets 文件夹之外。 (But the issue with this approach is if you are supporting Dark Mode then it's not possible anymore to set a different image for dark and light mode.)
(但这种方法的问题是,如果您支持暗模式,则无法再为暗模式和亮模式设置不同的图像。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.