I have a 300 x 300 sized UIImageView in my app which is displaying my images very nicely. My images are all 600 x 600 or larger and UIImageView simply resizes them for me.
My question is this: as these images are essentially all retina images anyway (i.e. double the required pixel size) is there any point in making a retina and a non-retina version of the same image? Won't this just make my app bigger because of the extra image files?
What's wrong with just letting the device downscale the images? I'm sure there's a very good answer so I'd like to know what it is!
Thanks for your advice.
For our apps we use a combination of the @2x images and doing what you've suggested, Scaling. We use the @2x images for bar buttons, icons, etc. But for UIImageViews we often just use the Scaling.
Here is an article that suggests both: http://mobile.tutsplus.com/tutorials/iphone/preparing-your-iphone-app-for-higher-resolutions/
Ignore the part about the iPad not supporting @2x (that is old information) but the article is still good.
There can be a performance hit for doing this, but for most apps I'd say this is negligible. The savings in file size sometimes make scaling the only option.
Scaling the images is an unnecessary overhead. Just provide two versions of it.
来源:https://stackoverflow.com/questions/4649908/retina-non-retina-images-in-uiimageview