1

I have an app created in Xcode which has loads of images. To make it slimmer i created folders within Xcode as .atlas and made sure that these contained the (*.png) images i wanted.

from the storyboard and XCode navigator i can see the png files, and the UIImageView objects show the correct image selected from the dropdown.

so there is no problem with the images being accessed, and no issue with file name.

When i clean/build/run the app through the iPhone simulator no images show the outcome is blank...

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Wizz69
  • 11
  • 4
  • i get various comments in the log which phrase (Could not load the image referenced from a nib in the bundle with identifier ) – Wizz69 Jun 05 '14 at 10:55
  • If your images have been optimized with Apple's version of pngcrush, they are no longer PNG files but proprietary Apple files that can only be read by XCode applications. You can use the XCode pngcrush to convert them back to PNG, or use 3rd-party "pngdefry" application. To find out if this has happened, you can look at bytes 12 to 15 of the file and see if they contain IHDR (in which case they are valid PNG files) or CgBI (in which case they are Apple-corrupted files). – Glenn Randers-Pehrson Aug 21 '14 at 02:35

1 Answers1

1

There are a bunch of different reasons why this could be the case. Here are a lot of answers that worked for some. http://solvedstack.com/questions/could-not-load-the-image-referenced-from-a-nib-in-the-bundle-running-on-device

In my case i had the same setup you described. One Texture Atlas and i wanted to use some of the pictures in there in an UIImageView.

I assume since TextureAtlas is mostly meant for SpriteKit, i added my Pictures that i wanted to use to the Images.xcassets folder. Then the preview in the Storyboard works as well as on the device.

Anzumana
  • 361
  • 3
  • 8