iPhone Development 101

iPhone 101

Code Tips

Resources

Links

Follow

Mailing ListTwitter

More

iPhone Development 101: Design:
Retina Images for iOS

To support high-resolution graphics on devices with retina displays, create two versions of each image in your app: a standard size image, and a double-sized image with "@2x" added to the name:

Standard Size: High Resolution:

button.png
60 x 20

button@2x.png
120 x 40

To refer to an image in your code (or in Interface Builder or Storyboard), use the filename of the standard sized image. iOS will automatically detect and use the @2x version if the device supports it.

imageView.image = [UIImage imageNamed:@"button.png"];

Additional References:


TopHome