使用缩放模式运行的iOS 8应用程序是否使用@ 3x图像?

时间:2014-10-06 00:33:27

标签: ios iphone iphone-6 iphone-6-plus

如果我有一个使用Xcode 6构建的iOS 8 iPhone应用程序不提供iPhone 6/6 +的启动图像,但我提供了@ 3x图像,那么在显示应用程序时iPhone 6+仍会使用这些资产缩放模式?

例如,我有someImage.pngsomeImage@2x.pngsomeImage@3x.png,并按如下方式加载图片:

UIImage* image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"someImage" ofType:@"png"]];

我没有iPhone 6+设备来测试它,并且iOS 8模拟器最终使用@ 3x图像为所有设备出于某些奇怪的原因,正如其他人指出here

1 个答案:

答案 0 :(得分:0)

当前版本的Xcode(6.3.2)中的iPhone 6+模拟器在缩放模式下运行时使用@ 3x版本的图像,其他模拟器仅使用@ 2x和@ 1x图像。

PaintCode开发人员的指南:http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions 还建议iPhone 6+在缩放前使用@ 3x图像。

虽然我没有iPhone 6+来测试它在实际设备上的行为是否相同。