Mac application does not use 2x 2x mesh files

I'm trying to update my application to support retina displays, but when it runs on Retina MacBook Pro, versions with @ 2x versions are not used. Below are the methods that I use in my application to install images.

In the XML parser class:

[[self theCurrent] setCurIcon:[NSImage imageNamed:@"snow.png"]]; 

Configuring NSImageView in the current class:

 [viewCurIcon setImage:curIcon]; 

Each image file has a standard res version and a high-resolution version, which are located in the Xcode project support files folder:

 snow.png is 128x128 pixels snow@2x.png is 256x256 pixels 

I confirmed that @ 2x versions are included in the application package when Xcode creates the application. The following should be noted: the application is a menu bar application with all the views inside NSPopover, the animated GIF is used in one of the image views (without the @ 2x version of GIF), the application is built with Xcode 4.4 on an older MacBook Pro with OSX 10.7.4 without a retina screen .

+4
source share
1 answer

Try using @"snow" instead of @"snow.png" . Thus, you point to the image with the name "snow" and allow the OS to understand the details regarding the resolution and extension, and not specifically indicate that the image will be called "snow.png"

+5
source

All Articles