Updating iPhone apps to support Retina displays
The iPhone 4′s 640×960 display is night and day better than the previous generation’s 320×480 display. Supporting both is actually pretty straightforward. The simplest thing is to do nothing: iOS 4 automagically up-sizes your image assets when running on a higher resolution display like the iPhone 4. It’ll look ok, but likely pixelated for the iPhone 4′s super sharp display.
To use higher res assets for iPhone 4, while keeping the lower res versions for earlier devices, simply add higher res images into your Xcode project with the following naming convention:
If you have an existing image named foobar.png that is 100×100, simply name the higher res 200×200 version as email@example.com, add it to your project, and re-build. You don’t need to do anything else…when that app runs on an iPhone 4, if there is a @2x version of an image, that version will be loaded instead.
This document on the Apple Developer site summarizes it nicely & goes into more detail than I’ve covered here.
No related posts.
You must be logged in to post a comment.