문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top