【发布时间】:2010-08-21 23:38:33
【问题描述】:
我的图像因按下按钮而发生变化。我的代码设置如下:
UIImage *example = [UIImage imageNamed: @"Example.png"];
UIImage *stuff = [UIImage imageNamed: @"Stuff.png"];
UIImage *bob = [UIImage imageNamed: @"Bob.png"];
UIImage *thing = [UIImage imageNamed: @"thing.png"];
过去最后一张图片是 Thing.png 而不是 thing.png。这是因为事情会加载到 iPhone 模拟器上,而不是设备上。我在这里看到一个问题说可能是因为iphone文件系统区分大小写,所以我将其更改为小写。然后它起作用了。我不明白的是在资源文件夹中它被称为Thing.png,而不是thing.png,并且在finder中也是如此。那么为什么需要更改它,尤其是在所有其他图像加载正常的情况下?
【问题讨论】:
标签: iphone objective-c xcode simulator