Http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html
Technical Q & A qa1686app icons on iPad and iPhone |
Q: How are the icon files in my application bundle used on iPad and iPhone? A: below are guidelines for handling Icon files for iPhone-only apps, iPad-only apps, and universal apps. Important:Icons marked"Required"Must be supplied in your application bundle. IPhone-only appsInclude the following in your application's Resources Group in the xcode project: Table 1:IPhone-only apps icon requirements.
Image size (PX) |
File Name |
Used |
Required status |
Notes |
512x512 |
Itunesartwork |
Ad hoc iTunes |
Optional but recommended |
File shoshould be in PNG format, but name it without the. PNG Extension |
57x57 |
Icon.png |
App Store and home screen on iPhone/iPod Touch |
Required |
<None> |
114x114 |
Icon@2x.png |
Home screen for iPhone 4 High Resolution |
Optional but recommended |
<None> |
72X72 |
Icon-72.png |
Home screen for iPad compatibility |
Optional but recommended |
<None> |
29x29 |
Icon-Small.png |
Spotlight and settings |
Optional but recommended |
<None> |
50x50 |
Icon-Small-50.png |
Spotlight for iPad compatibility |
Recommended if you have a settings bundle, otherwise optional but recommended |
<None> |
58x58 |
Icon-Small@2x.png |
Spotlight and settings for iPhone 4 High Resolution |
Recommended if you have a settings bundle, otherwise optional but recommended |
<None> |
Your Resources Group shocould look similar to Figure 1: Figure 1:Add files to Resources Group Workflow t for itunesartwork icon, List the names of each of these files inIcon files Entry inInfo.plist ,In the order shown in the table. Follow the steps in "add Icon files in info. plist" section below. See figure 4. Back to Top IPad-only appsInclude the following in your application's Resources Group in the xcode project: Table 2:IPad-only apps icon requirements.
Image size (PX) |
File Name |
Used |
Required status |
Notes |
512x512 |
Itunesartwork |
Ad hoc iTunes |
Optional but recommended |
File shoshould be in PNG format, but name it without the. PNG Extension |
72X72 |
Icon-72.png |
App Store and home screen on iPad |
Required |
<None> |
50x50 |
Icon-Small-50.png |
Spotlight on iPad |
Optional but recommended |
<None> |
29x29 |
Icon-Small.png |
Settings on iPad |
Recommended if you have a settings bundle, otherwise optional but recommended |
<None> |
Workflow t for itunesartwork icon, List the names of each of these files inIcon files Entry inInfo.plist ,In the order shown in the table. Follow the steps in "add Icon files in info. plist" section below. See figure 5. Back to Top Universal appsInclude the following in your application's Resources Group in the xcode project: Table 3:Universal apps icon requirements.
Image size (PX) |
File Name |
Used |
Required status |
Notes |
512x512 |
Itunesartwork |
Ad hoc iTunes |
Optional but recommended |
File shoshould be in PNG format, but name it without the. PNG Extension |
57x57 |
Icon.png |
App Store and the home screen on iPhone/iPod Touch |
Required |
<None> |
114x114 |
Icon@2x.png |
Home screen for iPhone 4 High Resolution |
Optional but recommended |
<None> |
72X72 |
Icon-72.png |
App Store and home screen on iPad |
Required |
<None> |
29x29 |
Icon-Small.png |
Settings on iPad and iPhone, and spotlight on iPhone |
Recommended if you have a settings bundle, otherwise optional but recommended |
<None> |
50x50 |
Icon-Small-50.png |
Spotlight on iPad |
Optional but recommended |
<None> |
58x58 |
Icon-Small@2x.png |
Spotlight and settings for iPhone 4 High Resolution |
Recommended if you have a settings bundle, otherwise optional but recommended |
<None> |
Workflow t for itunesartwork icon, List the names of each of these files inIcon files Entry inInfo.plist ,In the order shown in the table. Follow the steps in "add Icon files in info. plist" section below. See figure 4. Back to Top Add Icon files in info. plistTo addIcon files Entry you will need to manually edit yourInfo.plist . Open yourInfo.plist In xcode, and locate"Icon file "Entry. Click on the plus (+) button at the end of the entry to make a new key entry. As shown in figure 2. Figure 2:Add a new entry under "icon file" Key Then, type"Icon files "In the key column (Notice"s "Added), or choose"Icon files "From the drop down list, as shown in figure 3. Figure 3:Add "icon files" key in info. plist Next, turn down the disclosure triangle on"Icon files "And add the entries for the icons for your application, as shown in Figure 4 and figure 5: Figure 4:Add icon file entries for iPhone-only or universal apps. Figure 5:Add entries for iPad Icon files. Note:If you don't provide one of the listed optional icons, the system will automatically scale one of your existing icons to an appropriate size. however, it is strongly recommended that your application supply all the icons listed with specific sizes needed. |
//////////////////////////////////////// ///
Http://www.cocoachina.com/bbs/read.php? Tid-24549.html
In the past, it seems that we have found the relevant dimensions. I believe many people use them here ....
Start with icon
Naming method, for example
Icon.png 57 × 57
Icon-72.png 72X72
Icon-Small.png 29x29
Icon-Small-50.png 50*50
Icon@2x.png 114x114
Icon-Small@2x.png 58x58
Another
Itunesartwork 512 × 512
Key cfbundleiconfiles are used in info. plist. Note that they are separated from cfbundleiconfile. The priority of cfbundleiconfiles is higher than that of cfbundleiconfile.
If the extension is omitted and icon is directly written, it is automatically recognized.
To add an extension, you must add all image names to the array of cfbundleiconfiles.
Note that if you want to automatically recognize the key, the name must be strictly in accordance with the standard and the key is of the string type. If it is not automatically recognized, the key is similar to array and the complete file name is added.
Default naming method
<Basename> <orientation_modifier> <scale_modifier> <device_modifier>. PNG
The method is the same as the icon. Only the related suffixes are listed.
<Basename> the default value is default, which can also be set by uilaunchimagefile key. Here, the default value is used as an example.
<Orientation_modifier> orientation
-Portraitupsidedown
-Landscapeleft
-Landscaperight
-Portrait
-Landscape
None
It also means that you can use default-portrait.png to configure the image for the vertical screen, and the same pattern can also be used to directly default.png without specifying the direction
<Scale_modifier> is still prepared for iPhone 4, and its usage is the same as that of the icon
Default-portrait.pngand default-portrait@2x.png are automatically recognized.
<Device_modifier> identifies a device. There are two values.
~ IPhone
~ IPad
Default-Portrait ~ Iphone.png and default-Portrait ~ Ipad.png automatically determines that the device must pay attention to the same point. This is also applicable in the icon, but it seems that there is no need to use it now. It seems that the resolution of the iPad will be doubled in the future?
If custom URL schemes is used, the format is as follows:
<Basename>-<url_scheme> <scale_modifier> <device_modifier>. PNG
For example:
Default-myscheme.pngand default-myscheme@2x.png
Image:
If your resource directory contains two images: button.png and button@2x.png
Use:
Uiimage * animage = [uiimage imagenamed: @ "button"];
Will automatically recognize image loading
//////////////////////////////////////// ////
AddCFBundleIconFiles
Key of type array to your info. plist. the array shoshould contain 2 string items: the filenames of the two icons. the OS will then automatically choose the correct icon for each platform based on their pixel dimensions.
You can keepCFBundleIconFile
Key and have it point to the icon file for the iPhone for 3.0/3.1 compatibility.
Update May 2010: Apple now has technical note explaining this in great detail: Technical Q & A qa1686-app icons on iPad and iPhone