1. First, make it clear:
The pixel resolution of the iPhone 3g/3gs screen is 320x480;
IPhone 4 and iPod tou4's screen pixel resolution is 640x960.
2. In order to be compatible with apps before IOS 4.0 and run on iOS 4, Apple designed a logical Resolution Unit (point ).
One point on iPhone 3 is equivalent to one pixel, while one point on iPhone 4 is equivalent to four pixel;Therefore, the point resolution of all iPhone and iPod Touch devices is 320x480.That is, the logic resolution is consistent, ensuring that the app can run normally at a high-pixel resolution without modification, but the images in the app will be pulled up and displayed, affecting the appearance, did not take advantage of retina.
3. What should iOS app designers and developers do?
1) for the app icon design, the app released to store must also provide the app icon with a high-definition size (a high-definition version should be provided based on the original version). For details, refer to the official Apple documentation.
2) The static UI image materials referenced in the Code are also provided in two copies, one for low pixel resolution and one for high resolution.
For example: the original app material package has a demo.png, then APP bundle must provide another two times the size of demo.png, and the file name is demo@2x.png and added to the project;
In the code, you can still write [uiimage imagenamed: @ "demo.png"] in this way. without modifying the code, the IOS system can automatically retrieve image files of different sizes on different screens.
3) if the app is running and asynchronously retrieves images from the network for display, or dynamically generates images in the game app for display, you need to add code to determine different screen devices to get/generate different size images.
If ([[uiscreen mainscreen] respondstoselector: @ selector (scale)] & [[uiscreen mainscreen] scale] = 2 ){
// Enable 2x display iphoneapp on retina or iPad
// Obtain the HD Size Image
}
Else {
// Obtain a low-definition image
}
From: http://my.oschina.net/yongbin45/blog/69545