Let your app support the retina display of the new iPad

Source: Internet
Author: User

I. Application Images

Apple has upgraded the image resources in the standard IOS control. We need to worry about applying our own image resources. Just like the @ 2x high-resolution version created to support iPhone 4(High score)Images are the same. We need to create a high-score version for images in the iPad app. I know that many developers have completed this upgrade as early as the IOS 5.0 SDK. But I still want to emphasize that Michael jurewitz (@ jury) mentioned above:

-If you want to display your high score images on the new iPad, you must use xcode 4.3.1 together with the IOS 5.1 SDK!

2. Application icons

The next step is to create a high-score version for the app's main icon, because the low-score icon looks terrible on the new iPad desktop. To support more iOS devices and screens with higher resolutions, IOS developers need to prepare various sizes of primary keys for their applications.ProgramIcon file, and the file list looks longer and longer ......(TRANSLATOR: sigh ~). For more information, see the latest Apple developer documentation iOS app programming guide and iOS Human Interface Guidelines. From the official documentation, I found out what we need to prepare for the retina display for the new iPad:

IPad main app icon (144x144 pixels): 72X72 pixels were previously used on iPad 1 and 2 generations. Now we need an additional version of @ 2x (144x144 pixels ).

IPad search result icon (100x100 pixels): This icon appears in the system search result.(Note: The system settings are also available if the application supports this function). The previous version uses 50x50 pixels, And Now @ 2x requires 100x100 pixels.

File Name and info. plist File:

Depending on the minimum version of IOS supported by your application, you may need to specify the icon file name in the info. plist file or name the main icon file of different versions according to Apple's specifications. I am afraid that you are engaged in a universal application that can run on the iPhone or iPad, and you plan to support IOS 3.1.x or earlier versions.(TRANSLATOR: in fact, the device penetration rate of IOS 4.0 and later versions is very high, and there is no need to support the antique version. We are not Android). Before IOS 3.2, Icon files cannot be specified in the info. plist file. Therefore, you must use the specifications specified by Apple to name the icon files. A complete list is similar to the following:

● Icon.png-57 × 57 iPhone app icons

● Icon@2x.png-114x114 iPhone Retina Display app icon

Icon-72.png-72X72 iPad app icons

● Icon-72@2x.png-144x144 iPad Retina Display app icon

● Icon-Small.png-29x29 iPhone system settings and search result icons

● Icon-Small@2x.png-58x58 iPhone Retina Display System settings and search result icons

● Icon-Small-50.png-50x50 iPad system settings and search result icons

● Icon-Small-50@2x.png-100x100 iPad Retina Display System settings and search result icons

 

If your application is only compatible with IOS 3.2 and later versions, you can go to info. the icon file is specified in the plist file. You do not need to follow the naming rules above. Of course, it is no problem if you have to do so.(TRANSLATOR: We recommend that you follow this rule to facilitate communication with the US and manage future project resources). In IOS 3.2, Apple introduced the cfbundleiconfiles key in the info. plist file, where you can directly specify various versions of the application icon. If you omit the suffix of .png, you can ignore the @ 2x part of the high-score image and the system will automatically match it.

In IOS 5.0, Apple introduced a new key cfbundleicons to support the newsstand function, which makes things more complex (Translator: sigh again ~). The key contains the sub-key cfbundleprimaryicon, And the cfbundleiconfiles sub-key is saved in the key cfbundleiconfiles of the info. plist root node. If your app only supports IOS 5.0 and later versions, you can use a cfbundleicons key. Otherwise, you need to keep both the cfbundleiconfiles key and related content.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.