image sizes between differently sized iphones - ios

I am making a game, with sprite-kit and swift. I understand you can use #3x #2x #1x etc. however in testing this on an iphone 5s and 6 they both load the #2x.
Is there a way to handle this better? am I missing something?

The iPhones 5s and 6 both use #2x. The only device to use #3x is the iPhone 6 Plus. Apple's docs.

Related

iPhone 6 and 6 plus scaled up screen icons

I am using scaled up views for iPhone 6 and 6 plus for my app i.e. I haven't added splash screen for iPhone 6 and 6 plus.
I would like to know will the iPhone 6 and 6 plus will use high definition images (#3x) or as it is only scaled up app so will use retina images (#2x).
Kindly let me know if anyone has came across this.
It will not use #3x images until you add launch screens.
Thanks all for your reply.
Today I created one POC using 1x, 2x and 3x image and tested it on simulator. Look like application is using high definition image for iPhone 6 plus. I have attached images for reference.
I don't have device to test this POC. Hope this will behave same on device.

iOS #2x images conflicting

I've a little confusion and facing a little problem regarding #2x images in iOS as according to Human Interface Guidelines HIG, the #2x For iPhone 6: 750 x 1334 (#2x) for portrait but same #2x for iPhone 4S has size of 640x1136.
HIG
When I placed #2x image named as MyTestImage#2x.png of size 750 x 1134, it was fine for iPhone 6 but not for iPhone 4S, but if I put MyTestImage#2x.png of size 640x1136 then its fine for iPhone 4S but not for iPhone 6.
I also placed 640x1136 as Retina 4 2x named as MyTestImage-568h#2x.png but its also not working for me.
Whats I'm conflicting? What should be the actual image sizes of #2x for iPhone 4S and iPhone 6 if I talk about a full screen image.
And also what should be the correct retina display image size.
EDIT 1:
My question is different as I want to know the difference between #2x and -568h#2x retina display regarding both screens. Also, any optimal solution for this which can avoid image redundancies.

Forcing iPhone6 to take 3x or Retina4 2x graphics

Is there a way by which we can programmatically enforce iPhone 6 device to take either Retina4-2x or 3x graphics instead of 2x graphics from asset catalog? Presently, I noticed that iPhone 6 is picking 2x graphics, instead of Retina4-2x.
iPhone 6 uses 2x graphics because it can only display up to such density. Retina4-2x and 2x has no difference, its the same scale.
You should read the excellent article at PaintCode. However, it would seem you're missing the fact that iPhone 6 uses #2x and iPhone 6+ uses #3x.

How to use separate images for iphone 5 and iphone 6

I my application i'm trying to set images in imageView pragmatically. i'm using separate images for iPhone 5 and iPhone 6. What would be the suffix iPhone 6 images? as #2x is for iPhone 5 images.
It is the same, there is #3x for Iphone 6+.
Please refer https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1
#2x is not a suffix exactly for iphone5 - it's reprepresent of how much real pixel in one point in this image, so it can be used in any numbers of devices (available and new) what will have display with double density. As for iPhone 6+ (exactly 6+ for now) it use triple density display, so it used now #3x suffix.
You can do what you want programmatically - detect device and use the name you want. But #2x and #3x will be used (if available) dependently of device.

Image Sizes for Supporting iPhone 4S,5,5C/S,6 and 6+

I want to support a variety of devices from iPhone 4S to iPhone 6+. Previously, when adding supporting for iPhone 5, we followed the following steps.
Add the launch Default-568h#2x.png
Use the same #2x images (640x960) which are resized automatically for iPhone 5.
Now, iPhone 6 and 6+ are introduced with varying sizes and it is written on most blogs that we will use #2x for iPhone 6 and #3x identifier for iPhone 6+. It is also written that:
iPhone 6+ (#3x) images will have resolution of 1242x2208 (I am using portrait mode), and it is automatically downsized.
iPhone 6 will use #2x images.However,I am not sure what the size of these images should be. Should they be 640x960 or 640x1136 or 750 x 1334. In case of using the first two sizes, won't the images be distorted?
I think what you are after is detailed in the HIG under "Icon and Image Sizes"
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1

Resources