问题
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:

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?

回答1:
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
.
- Make sure if your app is Universal or Device specific. Based on that, you need to provide the icons.
- Point to be noted
Images.xcassets
doesn't sizes your files. It is just a catalog where you add the files of specific sizes. - 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). - Open the
Images.xcassets
& now read each empty icon elements. There is the size name provided, already. - NOW CONCENTRATE : If empty dasshed box reads as
2x
& text below reads asiPhone 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 of58x58
- 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.
- 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.

回答2:
AppICon Sizes - XCAssets - Xcode 6.4
iPhone Spotlight iOS 5-6 - 29pt
29*29 -1x, 58*58 - 2x, 87*87- 3x
iPhone Spotlight iOS 7,8- 40pt
80*80 - 2x, 120*120 - 3x
iPhone App iOS 5,6 - 57pt
57*57 - 1x, 114*114 - 2x
iPhone App iOS 7,8 - 60pt
120*120 - 1x, 180*180 - 2x
iPad Settings iOS 5-8 - 29 pt
29*29 -1x, 58*58- 2x
iPad Spotlight iOS 7,8 - 40pt
40*40 -1x, 80*80 - 2x
iPad Spotlight iOS 5,6 - 50pt
50*50 -1x, 100*100 - 2x
iPad App iOS 5,6 - 72pt
72*72 -1x, 144*144 - 2x
iPad App iOS 7,8 - 76pt
76*76 -1x, 152*152 - 2x
来源:https://stackoverflow.com/questions/22291696/create-ios7-icon-in-images-xcassets-with-xcode5