Reputation: 126457
I started a new project in Xcode 5.
What is this Images.xcassets
shenanigans?
Am I supposed to put the various images I'm using for my app (like button images & stuff) in there or only the AppIcon
& LaunchImage
?
I see I can create a new folder in Images.xcassets
. Should I create a folder called "Button Icons" or whatever and just throw them in there?
See, but I just want to add some retina images to my target.
I'm only supporting iOS 7. So, I don't need to worry about other formats like non-retina.
Why did they make this so complicated and not document it at all? Why do I need these extra Contents.json
files?
It looks like I can uncheck (remove) Images.xcassets
from the target but not the individual image files within the asset catalog.
Can I just do things the old way or would I be missing out on compression/performance enhancements?
Is there a setting I can set so that my app treats all image files as retina images even if they dont have the @2x
suffix in their filename?
Upvotes: 4
Views: 7690
Reputation: 779
There are not retina devices that are still supported by iOS 7 such as iPad mini and iPhone 3GS. Keep that in mind. The images will scale down and still work but I wanted to make sure you knew iOS 7 supported not retina devices.
When you ask for an image by name iOS will look for the image by name. For example, "background.png" if there is a retina image "[email protected]" and the device is retina iOS will handle that for you. If you only plan on providing retina images there is nothing wrong with making the images all retina and excluding the "@2x" info in the image. name.
Upvotes: 0
Reputation: 126457
In the "What's New in Xcode 5" WWDC 2013 Session Video, the speaker says Image.xcassets
"collects all of your image-based resources, such as your launch images, icons, loose images that you use in your project, together into one place."
"Also, Xcode knows about new iOS 7 APIs and so can even optimize the loading of your image-based resources." I'm assuming "it does it for you automatically" as long as you put your images in Image.xcassets
(or another asset catalog included in your target).
So, I suggest you suck it up, and adapt or die.
I don't know.
Upvotes: 11