I am developing a Mac app using Xcode 4.2 in OS X 10.6 Snow Leopard.
My Xcode project contains, in the same folder and at exactly-doubled dimensions:
image.png
image@2x.png
I use the Apple-recommended -[NSImage imageNamed:] method to load the correct resource depending on the user’s screen type:
[NSImage imageNamed:@"image"];
However, when I run the app on my non-retina 1440×900 display, the “@2x” version of the image is displayed. I get a 100×100 image when it should be a 50×50.
The same code works fine to deliver both standard-def and retina images, depending, when I run the app in 10.7 Lion (switching between standard and HiDPI modes).
I’ve thus far been unable to get Snow Leopard HiDPI (720×450) mode to work. But it still should be displaying the standard-def image when I use my standard-def display.
Is there a limitation of either Snow Leopard or Xcode 4.2 that causes this to work incorrectly? If so, how do you release an app that has a Deployment Target of 10.6 but still also has retina graphics support?
It seems as if Snow Leopard or Xcode 4.2 cannot properly combine High Resulotion Artwork into a single
.tifffile?Set
Combine High Resolution ArtworktoNOin your Target’s Build Settings.IMPORTANT: I then additionally needed to manually delete the previously created .tiffs from my app’s bundle.
-[NSImage imageNamed:]prefers the single .tiff to the 2 .pngs, so it will use the .tiff file if it finds it. Make sure it doesn’t.