Question

I am working on iPhone app in which I have more than 200 images those are all 2x, but "@2x" is not mentioned again all image names and what I am doing that I am creating UIImageVIew half by its actual size, if Images are 100*100 then create UIImageVIew 50*50. In result It show me correct size and no issue in showing but I am observing is that these images are getting pixelated, these are not rich as these should be. So is this real issue If not mention @2x against image name and either it is mandatory or optional adjust auto with device to device. Kindly guide me on this. Thanks in advance.

Was it helpful?

Solution

You should always put @2x after an image for retina devices.

When you use 50x50 UIImageViews for 100x100 images, it should work fine and you can hardly notice the differences. However, if it was 500x500, that would be a different story.

The real problem here is if you do like that, the image will be resized at run time whenever you used it. With up-to-date devices like iphone 5, 5s, ipad air ... resizing, says, 200 images will not be problem. However, with old devices like iphone 4, that would be a pain in the ...

If your app becomes huge, it (may) causes some lag, and nobody wants it.

I'm not sure what's the best practice for this but I usually make 2 versions of an image, one for retina and one for non-retina

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top