Retina images (@2x~ipad) not loaded if iPad image doesn't exist (~ipad)

I have something strange in my app.

If in the ressources I have 2 files named : myFile~ipad.png and myFile@2x~ipad.png the retina image is loaded on iPad retina as it should be. But If i have two files named myFile.png and myFile@2x~ipad.png , the retina images is never loaded and myFiles.png is used for all devices.

Is this normal ? The problem is that I want to use the image myFile.png for iPhone, iPhone retina and iPad and the image myFile@2x~ipad.png for iPad retina so I can't put the extension ~ipad beyond myFile.png.


Use symlink. I just google it, and didn't say it couldn't be done, but most of it points to symlink in an SD card.


You can have the same image "myFile.png" with different name as myFile~ipad.png so that you can have same result for iPhone, iPhone retina and iPad. And "myFile@2x~ipad.png" image for ipad retina display.

hope this will help.


We tried using symlinks, but it turns out that in the built app, the symlinks actually turned into copies of the images they linked to. Xcode resolves symlinks by copying the source file. So you can use symlinks for convenience, but not to save storage space in the built app.

链接地址: http://www.djcxy.com/p/62904.html

上一篇: iOS会检测用户是否在iPad上

下一篇: 如果iPad图像不存在,则视网膜图像(@ 2x〜ipad)未加载(〜ipad)