对于仅限iPhone的iOS 7+应用程序,我们只能包含@ 3x图像吗? [英] For an iPhone only, iOS 7+ app, can we include only @3x images?

查看:430
本文介绍了对于仅限iPhone的iOS 7+应用程序,我们只能包含@ 3x图像吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了减少捆绑尺寸,是否可以(并且一个好主意)只添加@ 3x图像?

In an effort to reduce bundle size, is it possible (and a good idea) to only add @3x images?

为了澄清,我不是指应用程序图标,启动图像等。但应用程序内部的图像,如UIButton背景图像。

To clarify, I'm not referring to the app icon, launch image, etc. But images that are internal to the app, like UIButton background images.

我看到新iPhone 6和6+的图像分辨率,添加了@ 3x支持?,但它没有回答我的问题。

I saw Image resolution for new iPhone 6 and 6+, @3x support added?, but it didn't answer my question.

推荐答案

是的,你可以,但你不应该。

Yes you can, but you shouldn't.

如果你只添加@ 3x图像,它将减少你的包大小并兼容所有屏幕密度。

If you only add @3x images it will both reduce your bundle size and be compatible with all screen densities.

但是,我不建议这样做。仅嵌入@ 3x图像将导致每次运行应用程序时缩小图像。这种方法有以下缺点:

However, I do not recommend doing it this way. Embedding only @3x images will cause your images to be scaled down each time the app is run. This approach has the following downsides:


  • 您无法控制iOS使用的图像缩放模式。某些图像在自动缩放后可能会看到显着的像素化和/或瑕疵。

  • 缩放图像可能会降低应用性能。在旧设备上尤其如此,这些设备将进行大量扩展。仅使用@ 3x图像将增加这些缩放操作的处理时间,甚至比从@ 2x缩小更多。

  • 您将没有像素完美导出资产的机会。许多设计师花时间手动缩放其图像资源,以确保不会破坏精细的笔触和纹理。这样可以获得所有设备类型的最佳体验。

如果您关心的应用在大多数设备上看起来清晰明快,我会强烈建议您至少导出图像@ 2x和@ 3x屏幕密度。根据项目的兼容性需求,我有时选择不导出@ 1x。

If you care about your apps looking clear and crisp on most devices, I would highly recommend that you at least export your images @2x and @3x screen densities. Depending on the compatibility needs of the project, I sometimes choose not to export @1x.

如果您的目标只是运行iOS 7+的iPhone,那么你肯定不会需要导出@ 1x。所有@ 1x iPhone设备都不支持iOS 7+。您需要担心的唯一@ 1x设备是iPad 2和iPad mini(非视网膜)。

If you are only aiming for iPhones running iOS 7+, then you definitely do not need to export @1x. All @1x iPhone devices do not support iOS 7+. The only @1x devices that you will need to worry about are the iPad 2 and iPad mini (non-retina).

另一个注意事项:在研究你的问题时,我听到有传闻说苹果可能拒绝你的应用程序,因为每个密度都没有图像。我从来没有经历过这个。我在开发人员指南中唯一能找到的就是这条规则。

Another note: in researching your question I heard rumors that Apple may reject your apps for not having images at every density. I have never experienced this. The only thing that I could find in the developer guidelines was this rule.

2.10 iPhone应用程序也必须在iPad上运行而无需修改,iPhone分辨率和2X iPhone 3GS分辨率

2.10 iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution

对我而言,这似乎暗示只要它有效,你就是好人。但来吧,男人,让它美丽!

To me this seems to imply that as long as it works, you are good. But c'mon man, make it beautiful!

这篇关于对于仅限iPhone的iOS 7+应用程序,我们只能包含@ 3x图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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