简体   繁体   English

对iOS启动映像使用自定义文件名

[英]Use custom file names for iOS launch images

是否可以像使用图标文件一样(例如通过Info.plist条目)为iOS应用程序启动/启动图像定义自己的命名约定,还是必须坚持使用...@2x.png...-568h@2x.png命名?

If you use an Asset Catalog (new in XCode5), you can use whatever file naming convention you like. 如果使用资产目录(XCode5中的新增功能),则可以使用任何喜欢的文件命名约定。 The Asset Catalog takes care of mapping a logical name for an image resource to a set of files on disk. 资产目录负责将映像资源的逻辑名映射到磁盘上的一组文件。

You can change the root name (the “Default” bit) with the UILaunchImageFile key, which has been available since iOS 3.2, but in that case the suffixes— @2x , -568h@2x , etc.—are still fixed. 您可以使用UILaunchImageFile键更改根名称(“默认”位),该键自iOS 3.2起可用,但在这种情况下,后缀@2x-568h@2x等仍然固定。 To supply a set of arbitrary images, you can use the UILaunchImages array, but be advised that that API is iOS 7-only. 要提供一组任意图像,可以使用UILaunchImages数组,但是请注意该API仅适用于iOS 7。

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

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