Search code examples
macoscocoaretina-display

Retina issue (OS X)


I am creating a Cocoa app, and when I import @2x images into my project, no image shows up in the app at all. I am using a non-Retina MacBook Pro.

If I have an image, such as image.png, it shows up correctly.

When I import [email protected] into the project, no image shows when the app is run (even the normal image).

When I change [email protected] to [email protected] (or some other name), the image shows up again. However, now I can't show the image on a Retina device.

Am I not handling Retina images correctly?


Solution

  • You need to include the image.png AND the [email protected] in your project. Also make sure that when you load the files you do not include the .png extension.