Supporting iPad non-retina with retina images only

我与影子孤独终老i 提交于 2019-12-25 03:45:33

问题


I am developing an iPad application and started all my development having in mind the retina resolution (2048x1536).

I named all my images without the @2x suffix. The app seems to be working fine in the iPad AND the iPad retina simulator.

Do I have to rename all these images to add the @2x suffix and add a copy of all of them without it, and at 1/2 scale? As I see it some automatic scaling is done by itself. Is this ok performance wise?


回答1:


It's fine for performance. The big issue, actually, would be memory. It is a waste of memory to display a double-size image when a single-size image will do; after all, we're talking about an image four times as large. This might or might not matter depending on how much memory we're talking about. In general you should always be scaling images down, yourself, to the actual display size/scale at which they are used, whether you do that in code or by supplying multiple versions or whatever. To do otherwise can be a significant memory waste.



来源:https://stackoverflow.com/questions/26000740/supporting-ipad-non-retina-with-retina-images-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!