Moshe
Moshe

Reputation: 58067

Retina compatibility question: Can I add @2x to my own images for retina compatibility?

If I append the @2x suffix to my own images, will iOS 4 automatically replace my images with the Retina compatible ones, or does that only apply to Apple defined images? (Icons, for example.)

Upvotes: 4

Views: 1802

Answers (2)

Philipp Schlösser
Philipp Schlösser

Reputation: 5219

Yes, of course. If you display a myimage.png in your app, you may add a retina ready [email protected], so it is shown on retina devices.

See this guide for further information.

Upvotes: 7

aegzorz
aegzorz

Reputation: 2219

From the documentation:

The bundle- and image-loading routines automatically look for image files with the @2x string when the underlying device has a high-resolution screen.

So using for example [UIImage imageNamed:@"MyImage.png"] will automatically look for [email protected] when running on a device with retina display.

Upvotes: 2

Related Questions