问题描述
任何人都知道如何为暗或亮模式选择不同的启动图像集吗?
Anybody knows how I can choose a different set of Launch images for Dark or Light modes?
推荐答案
由于启动屏幕在应用开始执行之前加载,因此无法以编程方式更改启动图像集.
As the Launch Screen loads before the app starts executing, it would not be possible to change the launch images set programatically.
但是,在Image Set
选项卡中,您可以更改Appearance
选项以为明暗模式启用一组不同的图像:
However, in the Image Set
tab, you can change the Appearance
option to enable a different set of images for Light and Dark modes:
因此,如果您在启动屏幕故事板"中设置此图像,结果将如下所示:
So, if you set this image in the Launch Screen Storyboard, the result would be as below:
另一方面,如果仅需要更改背景颜色而不是图像,则可以将启动屏幕情节提要"视图的背景颜色设置为System Background Color
,而仅使用透明的.png图像.
On a side note, if the need is just to change the background color, not the images, you may set the Launch Screen Storyboard view background color to System Background Color
and just use transparent .png images.
这篇关于在暗或亮模式下启动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!