简体   繁体   English

如何在iOS 8上强制启动图像而不是启动屏幕?

[英]How to force launch images instead of launch screen on iOS 8?

How do I disable launch screen for my app for iOS 8? 如何为iOS 8的应用禁用启动屏幕?

I want to have old-fashioned images for that. 我希望有老式的图像。

If that is not possible, how do I setup my LaunchScreen.xib to show correct image based on device? 如果无法做到这一点,如何设置我的LaunchScreen.xib以显示基于设备的正确图像?

Just delete LaunchScreen.xib if you want to use images. 如果要使用图像,只需删除LaunchScreen.xib即可。 Under Images.xcassets , you will be able to assign your static images when you create LaunchImage just like how it used to be. Images.xcassets ,您可以在创建LaunchImage时分配静态图像,就像LaunchImage一样。

And yes, delete the value in Launch Screen File selector in your target's settings. 是的,删除目标设置中的Launch Screen File选择器中的值。

除了其他答案之外,还要确保在完成更改后从模拟器/设备中删除了应用程序

I found a way. 我找到了一个方法。 Delete the LaunchScreen.xib. 删除LaunchScreen.xib。 Then go to General tab in your target and delete the line in Launch Screen File selector. 然后转到目标中的“常规”选项卡,并删除“启动屏幕文件选择器”中的行。

It does not let you confirm empty screen, but you can overcome this by selecting any source file in Project navigator after you emptied the line. 它不允许您确认空屏幕,但您可以通过在清空该行后选择项目导航器中的任何源文件来克服此问题。

Also fill the "Asset Catalog Launch Image Set Name" in your target's Settings with the name of the LaunchImage you created in your Image Assets. 同时使用您在图像资源中创建的LaunchImage的名称填充目标设置中的“资产目录启动图像集名称”。 The field is blank when the project is created with a default LauchScreen. 使用默认LauchScreen创建项目时,该字段为空。

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

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