ios spritekit Xcode 6-xcassets for universal image support
what is a sprite kit (4)
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
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
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.
In 1x place image with resolution 320 x 480.
In 2x place image with resolution 640 x 960.
In Retina 4 2x place image with resolution 640 x 1136.
in 3x place image with resolution 1242 x 2208.
Images of Retina 4 2x will upscale to resolution 750 x 1334.
Images 3x will downscale to resolution 1080 x 1920.
You can also visit this links for launch screen images:
For all other images resolution and size:
https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/ https://developer.apple.com/ios/human-interface-guidelines/graphics/image-size-and-resolution/ https://developer.apple.com/ios/human-interface-guidelines/graphics/custom-icons/
How to use Image.xcassets:
Hope this will be more helpful.
There is one tool : AVXCassets Generator with which you can directly generate XCAssets file for all your icons and images just by one click.
hope you will like it.
If you have your launch images in an xcasset file, you can do the following in Xcode 6.
Select the launch image asset, select a specific resolution (1x, 2x, Retina 4, etc) and open the attributes inspector (see image below).
Under the "Image" section, you will have a "Expected Size" attribute.
Inside images.xcassets, you can add different devices support by right clicking as shown in the snap
Edit: Well, it doesn't seem working when I drag n drop images to placeholders. It gets messed up as shown next
I don't know why it is acting odd on my Xcode 6.4 though.
I see a bug from apple here. I can select 'Universal' along with any device upon right click as you can see in the first image above. But via attribute inspector I can correctly select either 'Universal' or specific devices as shown here
In Xcode 7 the attribute inspector has been changed and now it gives option same like the right click. So instead of either 'Universal' or specific devices, now it offers to select all.