我有一个由于按下按钮而改变的图像。我的代码设置如下:
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中也是如此。那么为什么需要更改它,特别是如果所有其他图像都加载得很好?