I have a set of pixel perfect icons which I want to use on toolbar (NSToolbar) of my app. Toolbar is configurable thus I need to provide icons in four sizes: small, standard, small@2x, standard@2x. I could not find any official information about the size of those icons, but unofficial information (confirmed by my tests) is the following: small is 24px, normal is 32px.
Thus I need to add four different images: 24x24px, 32x32px, 48x48px, 64x64px to my image set.
As for now I could not find a correct way for that. I have tried a dozen of different methods but could not find one which preserves pixel perfect quality of all four images.
I believe, I can load right size of the image manually each time it has to be changed, but I am wondering if where is a correct way for that.
Does anyone has a good solution for that?
And yes, I clean build folder before each test.
See the Apple Developer site Human Interface guidelines for formats and sizes. The requirements are different for the different devices, and quite detailed.
For a quick & dirty solution if you're not ready to ship and just want nice looking graphics for testing, I've found that one 512 x 512 pdf, labeled "image@2x" works pretty well. You need to set the
and Cocoa will take care of the rest. But it's definitely not ready for prime-time.