Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dantastic

macrumors 6502a
Original poster
Jan 21, 2011
572
678
I'm making an image gallery view and for each image I create & store a thumbnail of the full size image. I'm making a thumbnail 100x100.

How does this work for the retina display? should I test when creating my thumbnail if the phone has a retina display and save a 200x200 thumbnail or what's the best approach here? If it has retina display save the thumb with a myThumb@2x.png ?

The UIImageViews I roll out in the code are obviously 100x100
 
I'm making an image gallery view and for each image I create & store a thumbnail of the full size image. I'm making a thumbnail 100x100.

How does this work for the retina display? should I test when creating my thumbnail if the phone has a retina display and save a 200x200 thumbnail or what's the best approach here? If it has retina display save the thumb with a myThumb@2x.png ?

The UIImageViews I roll out in the code are obviously 100x100

Anything with an @2x extension should automatically be used by the retina display. It would probably be better to use this method.
 
Yes, your thumbnails should be twice the dimensions for retina display. You can easily check this in the Sim if you don't have a retina display image. Just load it up in the Retina Sim.

Using @2x probably doesn't do anything for you in this case. Its purpose is to allow your code to use one file name and allow the OS to choose between two files with almost the same name when loading the file. In your case you only have one thumbnail file. Its size will differ between the two displays but that doesn't matter. If you were providing static thumbnails where both would be present in the app you would use @2x.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.