为什么我的资产目录不能返回R4图像? [英] Why isn't my Asset Catalog returning R4 images?

查看:139
本文介绍了为什么我的资产目录不能返回R4图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将图片迁移到资产目录。我的应用需要在启动后访问启动图像并在屏幕上显示。

I'm in the process of migrating my images to an Asset Catalog. My app needs to access the Launch Image after launch and display it on the screen.

很简单,但我有不同的图像当我打电话给 [UIImage imageNamed:@LaunchImage] 时,我的iPhone 5正在加载短的启动图像。

Easy enough, but I have different images for short and tall iPhones, and my iPhone 5 is loading the short launch image when I call [UIImage imageNamed:@"LaunchImage"].

好的,也许我不能用启动图像做到这一点。我会尝试将一些图像放在普通的图像集中。

Okay so maybe I can't do this with a Launch Image. I'll try putting some images in a normal Image Set instead.

没有骰子。使用iPhone 5,当我调用 [UIImage imageNamed:@Derp] 或者当我在Interface Builder中设置图像时,我得到2x(视网膜)图像而不是R4(视网膜4英寸)图像。

No dice. Using an iPhone 5, when I call [UIImage imageNamed:@"Derp"] OR when I set an image in Interface Builder, I get the 2x (retina) image instead of the R4 (retina 4-inch) image.

此功能是否已损坏?如何在iPhone 5(iOS 7)上获取R4图像?

Is this feature broken? How to I get the R4 image on my iPhone 5 (iOS 7)?

推荐答案

要自动选择R4图像Xcode你必须将iOS Target更改为iOS 7.
所以即使你使用iOS7 SDK,你的项目目标必须是iOS 7。

For the R4 image to be automatically selected by Xcode you have to change the iOS Target to iOS 7. So even if you use the iOS7 SDK, your project target must be iOS 7.

这篇关于为什么我的资产目录不能返回R4图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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