xcode iphone .png 图像未显示在设备中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3596108/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iphone .png image not showing up in device
提问by Stefan
ok, i set some .png files image as uimage in my table cell. they show up nicely when i run them using iphone simulator. when i run them in my device, they up not show up. what seems to be the problem?
好的,我在表格单元格中将一些 .png 文件图像设置为 uimage。当我使用 iphone 模拟器运行它们时,它们显示得很好。当我在我的设备中运行它们时,它们没有出现。似乎是什么问题?
i only "error" i got is unable to debug when i install my app to my device, which shouldn't be a problem as i never set for debug.
当我将我的应用程序安装到我的设备时,我只有“错误”无法调试,这应该不是问题,因为我从未设置为调试。
does anyone knows why?
有谁知道为什么?
thks in advance!
提前谢谢!
code:
代码:
- (void)setIcon:(UIImage *)newIcon
{
[super setIcon:newIcon];
iconView.image = newIcon;
}
where iconview.image is from nib. newIcon is loaded in from plist, 1.png etc.
iconview.image 来自笔尖。newIcon 从 plist、1.png 等加载。
回答by hotpaw2
Is the uppercase/lowercase letter usage of your file names exactly consistent between the source code or plist strings and the actual file names in your app's bundle? Case awareness is a difference between the Mac OS and iOS file systems.
源代码或 plist 字符串与应用程序包中的实际文件名之间文件名的大写/小写字母用法是否完全一致?案例感知是 Mac OS 和 iOS 文件系统之间的区别。