Xcode 5 &资产目录:如何引用 LaunchImage? [英] Xcode 5 & Asset Catalog: How to reference the LaunchImage?

查看:20
本文介绍了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​​nchImage-568h@2x.png
  • Lau​​nchImage-700-568h@2x.png
  • Lau​​nchImage-700-Landscape@2x~ipad.png
  • Lau​​nchImage-700-Landscape~ipad.png
  • Lau​​nchImage-700-Portrait@2x~ipad.png
  • Lau​​nchImage-700-Portrait~ipad.png
  • Lau​​nchImage-700@2x.png
  • Lau​​nchImage-Landscape@2x~ipad.png
  • Lau​​nchImage-Landscape~ipad.png
  • Lau​​nchImage-Portrait@2x~ipad.png
  • Lau​​nchImage-Portrait~ipad.png
  • Lau​​nchImage.png
  • Lau​​nchImage@2x.png
  • Lau​​nchImage-800-667h@2x.png (iPhone 6)
  • Lau​​nchImage-800-Portrait-736h@3x.png(iPhone 6 Plus 人像)
  • Lau​​nchImage-800-Landscape-736h@3x.png(iPhone 6 Plus 横向)
  • Lau​​nchImage-1100-Portrait-2436h@3x.png(iPhone X 人像)
  • Lau​​nchImage-1100-Landscape-2436h@3x.png(iPhone X 横向)

这篇关于Xcode 5 &资产目录:如何引用 LaunchImage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆