本文介绍了Xcode 5 &资产目录:如何引用 LaunchImage?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Xcode 5 的资产目录,并且我想使用我的 LaunchImage
作为我的主视图的背景图像(从加载"到加载"的转换是一种非常常见的做法'看起来很光滑).
I am using Xcode 5's Asset Catalog, and I would like to use my LaunchImage
as the background image of my home view (a pretty common practice to make the transition from 'loading' to 'loaded' look smooth).
我想在资产目录中使用相同的条目来节省空间,而不必在两个不同的图像集中复制图像.
I would like to use the same entry in the Asset Catalog to save space and not have to replicate the image in two different Image Sets.
但是,调用:
UIImage *image = [UIImage imageNamed:@"LaunchImage"]; //returns nil
推荐答案
这是 LaunchImage 的(几乎)完整列表(不包括没有状态栏的 iPad 图像):
This is the (almost) complete list of the LaunchImage (excluding the iPad images with no status bar):
- Lau[email protected]
- Lau[email protected]
- LaunchImage-700-Landscape@2x~ipad.png
- LaunchImage-700-Landscape~ipad.png
- LaunchImage-700-Portrait@2x~ipad.png
- LaunchImage-700-Portrait~ipad.png
- Lau[email protected]
- LaunchImage-Landscape@2x~ipad.png
- LaunchImage-Landscape~ipad.png
- LaunchImage-Portrait@2x~ipad.png
- LaunchImage-Portrait~ipad.png
- LaunchImage.png
- Lau[email protected]
- Lau[email protected] (iPhone 6)
- Lau[email protected](iPhone 6 Plus 人像)
- Lau[email protected](iPhone 6 Plus 横向)
- Lau[email protected](iPhone X 人像)
- Lau[email protected](iPhone X 横向)
这篇关于Xcode 5 &资产目录:如何引用 LaunchImage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!