Image resolution for new iPhone 6 and 6+, @3x support added?(新 iPhone 6 和 6+ 的图像分辨率,是否添加了 @3x 支持?)
问题描述
I have looked on few articles and discussion like one here and Here about image resolutions that new iPhones will use @3x images for display. Is it true?
So does it mean we will have to keep three images? Say for example I have an image of 50 X 50, will I have to keep 3 images for optimizing the look for new iPhones?
- Normal (50 X 50)
- @2x - Retina (100 X 100)
- @3x - Retina HD (150 X 150)
Or will the new phones use @2x images only and there is nothing like @3x?
I have tested by making a sample project and all simulators seem to use @3x images, this is confusing.
Edit
Here is some more info
- 3GS ( 163 ppi so use Normal)
- 4, 4s, 5 and 5s (326 ppi so we use @2x)
- 6 (326 ppi so it seems like it will use @2x)
- 6 plus (401 ppi here lies the confusion )
Edit
Based on Answers given by Tsob and nitin, I added @3x images to my project.
Informational Edit
I see few users are confused about why iPhone 6 uses @2x images even though it has higher resolution , the reason is
iPhone 6 might have different resolution but has same density of per pixel inch (PPI)
- Resolution concerns an absolute number of pixels.
- Density (aka Pixels per inch - PPI) concerns a relative number of pixels per inch which is same in case of iPhone 6 and previous iPhones , but different in iPhone 6 plus.
Check more about this here in this thread
Hence iPhone 6 uses @2x image same as iPhones 4 , 5 and 5S as it has same PPI and iPhone 6 plus uses @3x.
I've tried in a sample project to use standard, @2x and @3x images, and the iPhone 6+ simulator uses the @3x image. So it would seem that there are @3x images to be done (if the simulator actually replicates the device's behavior).
But the strange thing is that all devices (simulators) seem to use this @3x image when it's on the project structure, iPhone 4S/iPhone 5 too.
The lack of communication from Apple on a potential @3x structure, while they ask developers to publish their iOS8 apps is quite confusing, especially when seeing those results on simulator.
**Edit from Apple's Website **: Also found this on the "What's new on iOS 8" section on Apple's developer space :
Support for a New Screen Scale The iPhone 6 Plus uses a new Retina HD display with a screen scale of 3.0. To provide the best possible experience on these devices, include new artwork designed for this screen scale. In Xcode 6, asset catalogs can include images at 1x, 2x, and 3x sizes; simply add the new image assets and iOS will choose the correct assets when running on an iPhone 6 Plus. The image loading behavior in iOS also recognizes an @3x suffix.
Still not understanding why all devices seem to load the @3x. Maybe it's because I'm using regular files and not xcassets ? Will try soon.
Edit after further testing : Ok it seems that iOS8 has a talk in this. When testing on an iOS 7.1 iPhone 5 simulator, it uses correctly the @2x image. But when launching the same on iOS 8 it uses the @3x on iPhone 5. Not sure if that's a wanted behavior or a mistake/bug in iOS8 GM or simulators in Xcode 6 though.
这篇关于新 iPhone 6 和 6+ 的图像分辨率,是否添加了 @3x 支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:新 iPhone 6 和 6+ 的图像分辨率,是否添加了 @3x 支持?
基础教程推荐
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01