xcode 图像资产目录无法识别 xCode5 中的 Retina 4 照片
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18744554/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Image Assets catalog doesnt recognise retina 4 photos in xCode5
提问by user1117453
For start what I am trying to do i am not even sure that is possible(looks that is) In the feature of image assets in Xcode you can select for an imageSet to be either Universal or Device Specific. When I am doing it Device Specific and select both iphone and Retina 4 and assign pics to all , it is always selected the iphone retina image and never the Retina 4 when I am using an iphone 5(device or simulator)
对于开始我正在尝试做的事情,我什至不确定这是可能的(看起来是这样)在 Xcode 中的图像资产功能中,您可以选择一个图像集是通用的还是特定于设备的。当我执行特定于设备并选择 iphone 和 Retina 4 并将图片分配给所有人时,当我使用 iphone 5(设备或模拟器)时,它总是选择 iphone 视网膜图像而不是 Retina 4
Have searched docs but couldnt find something. Thanks
已搜索文档但找不到某些内容。谢谢
回答by Wojciech Beling
The "R4" image will only work on 4-inch iPhone running iOS 7 or later. On older version of iOS it will use 2x image.
“R4”图像仅适用于运行 iOS 7 或更高版本的 4 英寸 iPhone。在旧版本的 iOS 上,它将使用 2x 图像。
Example. If you use images like this:
例子。如果您使用这样的图像:
you will see:
你会看见:
- iPhone 5 iOS >= 7 - number 3,
- iPhone 5 iOS < 7 - number 2,
- iPhone 4, 4S - number 2,
- iPhone 3GS - number 1,
- iPhone 5C and 5S - number 3.
- iPhone 5 iOS >= 7 - 数字 3,
- iPhone 5 iOS < 7 - 数字 2,
- iPhone 4、4S - 2 号,
- iPhone 3GS - 编号 1,
- iPhone 5C 和 5S - 编号 3。
回答by toblerpwn
In my experience, this is the case whenever you do not target specifically iOS 7.0 in your Deployment Target as part of your Project/Workspace settings.
根据我的经验,只要您的部署目标中没有专门针对 iOS 7.0 作为项目/工作区设置的一部分,就会出现这种情况。
Targeting anything other than 7.0 seems to result in this behavior.
针对 7.0 以外的任何内容似乎都会导致这种行为。
To clarify: this value essentially specifies the minimum version of iOS that is allowed to run your app. Specifying iOS 7.0 in this field will restrict use of your app/update to ONLY users with iOS 7.0.
澄清一下:这个值本质上指定了允许运行您的应用程序的最低 iOS 版本。在此字段中指定 iOS 7.0 会将您的应用程序/更新的使用限制为仅限 iOS 7.0 用户。