2

At the moment I'm trying to manage a large number of images by putting them in a folder and naming the folder [something].bundle, and dragging these into XCode.

Weird thing right now is that, if I run this in the simulator, I can get access to these images with [UIImage imageNamed:] as if all the files are within the main bundle; but running the same code on a actual device (iPad 4.3.3 in this case), imageNamed: doesn't work.

Can someone explain to me why this might be?

Billy
  • 1,374
  • 1
  • 17
  • 25
  • 1
    Device is case-sensitive. Ensure that the names match.. – visakh7 May 24 '11 at 06:37
  • I should add, this code was modified from existing working code, so all the names watched. The only difference was the use of .bundle folders – Billy May 24 '11 at 08:02

1 Answers1

1

You cant use imageNamed: with items in a bundle.

You need to either to imageWithContentsOfFile: or imageWithData:

See (iPhone) Use external image in UIImage imageNamed for similar examples.

Community
  • 1
  • 1
Tyler Zale
  • 634
  • 1
  • 7
  • 23