forgot to put regular image but it has Retina @2x image

帅比萌擦擦* 提交于 2019-12-21 19:27:37

问题


I have submitted my app which support both regular and retina display edition.

I forgot to put one of regular image file (a.png) but it has (a@2x.png) Retina image.
Is it going to be regular iPhone able to show (a@2x.png) image or not?

I have no clue since I don't have 3GS or iPod Touch, but on iPhone regular simulator came out to be show that image.

Any experience?

Thank You.


回答1:


When iOS loads an image it will check the file name for the correct image

ie. on a retina display device, it will check for imageName + @2x + .png. If it finds it, it will load it. If not, it will load the non-retina image and scale it.

On a non-retina display device the system will not check for the @2x in the filename, therefore it will just try to load imageName.png - if it can't find it, it can't load it, and nothing will display.

I would suggest pulling your binary and updating it.




回答2:


I haven't tried it, but my guess is it'll fail to load the image entirely. I've found the simulator's behavior regarding hi-res images to be fairly inconsistent with real devices. You'll probably want to fix that up and replace your binary asap.



来源:https://stackoverflow.com/questions/3786769/forgot-to-put-regular-image-but-it-has-retina-2x-image

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