[IOS] enables your app to support the retina display of the new iPad

Source: Internet
Author: User

Starting last week, big guys started to get started with the third-generation iPad. Since the new iPad uses a retina display screen, the resolution is doubled from that of the previous iPad (TRANSLATOR: the length and width are doubled, and the pixels are four times that of the previous one ). To support these new pixels, IOS developers need to consider upgrading their iPad applications. I will list some precautions below.

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 (high score) image we created to support the iPhone 4, we want to create a high-resolution version for the image 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 master program icon files of various sizes for their applications, and the file list seems to be getting longer and longer ...... (TRANSLATOR: sigh ~). For details, refer to 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 icons (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 (100*100 pixels): this icon appears in the system search result (Note: it is also in the system settings, if the application supports it ). 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 what you are doing is a universal app that can run on the iPhone or iPad ), and you plan to support IOS 3.1.x or earlier versions, 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 specified in the plist file does not need to comply with the naming rules above. Of course, it is no problem if you have to name the file, we recommend that you follow this rule ). 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 made things more complicated ~). 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.


The original Article is slightly different. cfbundleprimaryicon is not mentioned, and it is confusing. In fact, in xcode, info. plist is opened by default, and Icon files (iOS 5) and Icon files are displayed)


In short, in order to achieve backward compatibility, this step will bring a little confusion to developers and it is quite easy to make mistakes. Therefore, developers are advised to perform more tests on different devices and screen combinations.

 
3. screenshots of App Store


Apple recently made rule adjustments to application submission. For iPhone and iPod Touch applications, the retina display must be submitted for High-score application screens. The specific image size requirements are as follows (the front size includes the system status bar ):

-Landscape screen: 960x640 or 960x600

-Portrait screen: 640x960 or 640x920


At present, Apple has not yet made similar requirements for the submission of iPad apps, but it is time to consider using a high-score version to make your apps look appealing on the new iPad. The corresponding size is as follows (the front size contains the status bar ):

-Landscape screen: 2048x1536 or 2048x1496 pixels

-Portrait screen: 1536x2048 or 1536x2008 pixels


Note: Some people added in the original comments that the loading screen during runtime also needs to be prepared for the screen of the new iPad. File naming and size requirements:

-Landscape screen: default-landscape @ 2X ~ Ipad.png (2048x1496 pixels)

-Portrait screen: default-Portrait @ 2X ~ Ipad.png (1536x2008 pixels)

 

Original article: useryourloaf.com Compilation: bole online
-Chen Yuan

Related Article

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.