I have a compass.jpg
file that exists in Download
folder. Then I dragged this image to my Images.xcassets
. I made sure that the image is indeed within the folder by right click the image entry and view folder
.
Then, in storyboard, I set my logo image view to this image, and with name compass
. It all displays fine in the storyboard.
But, then, I started my app in my iphone, as well as in simulator. It gives me the following error:
Could not load the "compass" image referenced from a nib in the
bundle with identifier "com.x.Point"
I can't figure out how to solve this problem. Image's folder is indeed inside Images.xcassets
folder.
How do I resolve this problem?
Update
I eventually have to make compromise to add the image into the project itself rather than its .imageassets
folder.
I actually created a new project and copied and pasted all of my source code there, then .imageasset
folder works again! I guess it is not a problem of my project settings. It must have something to do with XCode, I am still unsure of.