Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 - xcassets for universal image support

Currently working on a universal SpriteKit project. I'll be supporting the following devices:

iPhone 4/s, iPhone 5/c/s, iPhone 6, iPhone 6+

iPad non-ret, iPad retina

enter image description here

I am confused on the iPhone part. I already have 4 versions for my background sprite for the 4 different screen resolutions of the iPhones. But which goes to which?

I know the 3x is for the 6+, and I think the 5/c/s goes to the Retina 4 2x, but I do not know where the iPhone4/s, and 6 go. Anyone know?

Side note, when I create a Launch Image inside my xcassets file, I am shown these options, which basically has all the device I am supporting. Just wondering why this is not also the case when creating an Image Set enter image description here

Also how do you guys approach creating images/sprites for a universal application? Now that the new iPhone 6, and 6 plus are out, I have 2 more resolutions to support which is still confusing for me as I'm still a beginner.

like image 471
aresz Avatar asked Sep 24 '14 15:09

aresz


People also ask

What is images Xcassets?

The images. xcassets catalog is the default asset, used to manage the required app icons and launch images.

How do I use Xcassets?

Use of xcassets is the new standard as of Xcode 5 and iOS 7. Import images by clicking on the blue folder called "Images. xcassets" then click on the small "+" plus sign at the bottom of the window that appears. Now choose "Import" to put images in there.

How do I import assets into Xcode?

In the Project navigator, select an asset catalog: a file with a . xcassets file extension. Drag an image from the Finder to the outline view. A new image set appears in the outline view, and the image asset appears in a well in the detail area.


1 Answers

This is a little confusing - here's how I understand it (this is in reference to the top image):

  • 1x images are for the original iPhone through the 3GS - 'standard' resolution devices (3.5" screens)

  • 2x images are for the iPhone 4 and 4S (3.5" Retina screens) and are also used for the iPhone 6.

  • Retina 4 2x are for the iPhone 5 and 5s (4" Retina screens)

  • 3x images are for the new iPhone 6+ (5.5" super-Retina [3x] screen)

I believe that the iPhone 6 (4.7" screen) will use the Retina 4 2x images, but I would have to test it.

Side note, when I create a Launch Image inside my xcassets file, I am shown these options, which basically has all the device I am supporting. Just wondering why this is not also the case when creating an Image Set

If you compare the two images, the lower one has everything the upper one does, except for a 1x iPhone graphic. You don't need that if you're only supporting iOS 7 and above, since iOS 7 doesn't run on any non-Retina phone-form devices. To be honest, I don't understand why the top image has a 1x iPhone form graphic option - maybe because you checked the "iPhone" box in the sidebar?

Also how do you guys approach creating images/sprites for a universal application

For most non-fullscreen images (like a logo), you really only have 3 resolutions to support - standard (1x), Retina (2x), and the iPhone 6+ (3x). These are simply different quality of images, not really different sizes. So if you have a 10x10 image on a standard device, that would mean you need a 20x20 image on a Retina device and a 30x30 image on an iPhone 6+. On all devices, they would show up as a 10x10 image.

A great tool I used for managing different resolutions of icons is iConify.

I create them at the highest size I need (30x30 [@3x] for an image I want to be 10x10 on a device), then save it as a png and resize copies to 20x20 [@2x] and 10x10 [standard]. A better solution would be to create and use vector graphics, which would resize better to any size.

like image 111
Undo Avatar answered Oct 16 '22 16:10

Undo