简体   繁体   中英

Images don't display in device but in simulator

I have an array:

langArray = [[NSMutableArray alloc]initWithObjects:@"Italiano",@"English",@"Francais", nil];`

and cell image like this :

 cell.imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"language_%@_disabled.png",[langArray objectAtIndex:indexPath.row]]];

but images don's display in device, in simulator they display normally.

Check the images name in your Xcode Project..

Because simulator is Case Insensitive and Device is Case Sensitive ..

May be the ImageName in your array different Imagename in your local. You can check upcapercase

检查您的Xcode项目源可能是您的图像扩展名为“.PNG” rathere然后“.png”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM