Xcode not finding images from atlas folders when running

542 views Asked by At

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...

1

There are 1 answers

0
Anzumana On

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.