iPhone - 没有加载~ipad图像 [英] iphone - not loading ~ipad image
问题描述
我的应用程序包上的同一个地方有3张图片:image~iphone.png,image @ 2x~iphone.png和image~ipad.png。
I have 3 images on the same place on my app's bundle: "image~iphone.png", "image@2x~iphone.png" and "image~ipad.png".
当我这样做时
UIImage *imageU = [UIImage imageNamed:[[NSBundle mainBundle] pathForResource:@"image"
ofType:@"png"]];
BOth,iPhone和iPhone 4雇用版本加载正常,但不是ipad图像。当我在iPad上运行时,我在imageU上没有。
BOth, the iPhone and iPhone 4 hires versions load fine, but not the ipad image. When I run on iPad, I get nil on imageU.
是的,图像在那里,名称是正确的(iphone~ipad.png)。
Yes, the image is there, the name is correct (iphone~ipad.png).
为什么?任何线索?
谢谢。
推荐答案
我发现解决方案因为:不要在iPad图像上使用任何扩展名。这种代字号技巧不适用于iPad。还有一个让我们浪费时间的东西。
I discovered that the solution for that is: do not use any extension on the iPad images. This tilde trick is not working for iPad. One more buggy stuff that makes us waste time.
这篇关于iPhone - 没有加载~ipad图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!