Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interface Builder doesn't show some of my resource images

I have almost 20 images in PNG format added to my current project on Xcode (under the proper group, Resources). Unfortunately, library window's Media tab doesn't show some of them. And if I create an UIImageView and set one of these invisible images from code, nothing shows up. I also tried from IB with adding a UIImageView and set its source image.

Is this problem a image format related issue or is there a tiny detail I'm missing.

What log says:

Could not load the "07_clock_icon.png" image referenced from a nib in the bundle
like image 802
Burcu Dogan Avatar asked Feb 28 '23 00:02

Burcu Dogan


1 Answers

The solution to this is a bit silly, but it definitely works:

Close XCode and the Interface Builder. Now, instead of opening XCode then opening the project, navigate to the project in Finder and double click on the project. When you open your xib file the blue file not found images will flash up, then be replaced with the correct images and the dropdown will show all your images in the Inspector.

like image 140
Robin Avatar answered Mar 06 '23 16:03

Robin