我有一个数组:
langArray = [[NSMutableArray alloc]initWithObjects:@"Italiano",@"English",@"Francais", nil];`
和像这样的细胞图像:
cell.imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"language_%@_disabled.png",[langArray objectAtIndex:indexPath.row]]];
但是图像不会显示在设备中,在模拟器中它们会正常显示。
答案 0 :(得分:8)
检查Xcode项目中的图像名称..
因为模拟器是Case 不敏感而Device是Case 敏感 ..
答案 1 :(得分:2)
您的数组中的ImageName可能是您本地的不同Imagename。你可以查看upcapercase
答案 2 :(得分:1)
签入您的Xcode项目源可能是您的图片扩展名 “。PNG”然后“。png”