简体   繁体   English

SwiftUI - LaunchImage 未显示

[英]SwiftUI - LaunchImage not showing

I cannot get a Launch Image to be displayed on my app, whatever I try.无论我尝试什么,我都无法在我的应用程序上显示启动图像。 For context, this is a completely new, 100% SwiftUI project and is in its very early infancy.就上下文而言,这是一个全新的 100% SwiftUI 项目,处于非常早期的起步阶段。

Everything builds & runs perfectly fine, but I just cannot get any launch image customisation going...一切都构建和运行得很好,但我无法进行任何启动图像定制......

My Info.plist :我的Info.plist 信息.plist

My assets:我的资产: 资产目录

I've tried cleaning, deleting DerivedData, reinstalling app on device + sim but to no avail...我试过清理、删除 DerivedData、在设备 + sim 上重新安装应用程序但无济于事......

What am I doing wrong?我究竟做错了什么?

I ran into a similar issue before and got it fixed by restarting my phone.我之前遇到过类似的问题,通过重启手机解决了这个问题。

See also: iOS launch screen does not update另请参阅: iOS 启动屏幕不更新

When using launch storyboards I found that if the images that I used where too large it would launch with a black screen.在使用启动故事板时,我发现如果我使用的图像太大,它会以黑屏启动。

I reduced the size of the images I was using (one was reduced to 900px by 700px) but I don't know the magical size that sorts it, I then rebooted my iPhone and it started to work fine.我缩小了我正在使用的图像的大小(一个缩小到 900px x 700px)但我不知道排序它的神奇大小,然后我重新启动了我的 iPhone,它开始工作正常。

I don't know if the size issue would affect normal launch images but it may be worth giving it a try with a smaller image.我不知道尺寸问题是否会影响正常的启动图像,但可能值得尝试使用较小的图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM