Search code examples
ios7iconsxcode5

Create iOS7 Icon in Images.xcassets with Xcode5


How can one create a iOS7 Icon in Images.xcassets with Xcode5? I've searched many places, but i did not find what the required Icon sizes were.

My App is for iOS7+.

Here is a screenshot:

enter image description here

I've added some icons below in the AppIcon.appiconset folder in mac. Do I need to add in the xcode side bar? What are the required sizes for the AppIcon.appiconset folder?

enter image description here


Solution

  • This is very easy & in-fact it is self explanable. You need not even have to think about the name of the icons. The only thing that you need to worry about is the sizes. Here is how to infer the sizes out of that screen.

    BASIC RULE : Multiply the 1x or 2x shown in the empty box with the pt value under it. When there are two boxes like 1x & 2x for the same pt value, let's say 40pt, it means you have to provide both the sizes of images. 40x40 & 80x80 .

    1. Make sure if your app is Universal or Device specific. Based on that, you need to provide the icons.
    2. Point to be noted Images.xcassets doesn't sizes your files. It is just a catalog where you add the files of specific sizes.
    3. Now let's say you have a myIcon.png file of a bigger size (its always better to create your app icon with a size of 1024x1024, if not then at least 512x512).
    4. Open the Images.xcassets & now read each empty icon elements. There is the size name provided, already.
    5. NOW CONCENTRATE : If empty dasshed box reads as 2x & text below reads as iPhone Spolight - iOS 5,6 Settings - iOS 5-7 29pt, then it is actually seeking an image double the size of 29pt, So you need an image size of 58x58
    6. You just need to re-size your actual image using any editor (previewer is the best editor) & create the specific size. Save it some where & drag upon that specific Box.
    7. You are done.

    Here is a sample to read it. Hope that makes all your doubt clear going forward. You need not have to worry about naming conventions of images when using Images.xcassets

    Once you have all your images ready, just drag & drop it into the Images.xcassets in Xcode itself. Make sure you are dropping it into AppIcon category. Similarly you need to do things for LaunchImage as well if you are interested.

    enter image description here