Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Put All Images in Asset Catalog?

I started a new project in Xcode 5.

  1. 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?

  2. 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?

like image 945
ma11hew28 Avatar asked Dec 19 '22 23:12

ma11hew28


1 Answers

  1. 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.

  2. I don't know.

like image 74
ma11hew28 Avatar answered Dec 24 '22 09:12

ma11hew28