The icon naming method can be as follows:
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, and the priority of cfbundleiconfiles is higher than that of cfbundleiconfile ),
If the extension is omitted and the icon is directly written, the system automatically identifies the icon of different sizes.
To add an extension, you must add all image names to the array of cfbundleiconfiles.
Note that if you want to automatically identify a key, the name must strictly follow 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
Http://blog.csdn.net/xiaobingbing/archive/2010/06/28/5698889.aspx