Builder interface does not show some of my resource images

I have almost 20 PNG images added to my current Xcode project (under the corresponding group, Resources). Unfortunately, the Media Media Media tab does not display some of them. And if I create a UIImageView and install one of these invisible images from the code, nothing will appear. I also tried from IB with the addition of UIImageView and set the source image.

This problem is related to the image format problem or is there a small detail that I do not see.

What the magazine says:

Could not load the "07_clock_icon.png" image referenced from a nib in the bundle 
+4
source share
5 answers

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

Close Xcode and the interface builder. Now, instead of opening Xcode, then opening the project, go to the project in Finder and double-click on the project. When you open your xib file, the blue file will not detect images that will blink, and then replace them with the correct images, and the drop-down menu will display all your images in the inspector.

+7
source

Heyy! I understood. This is a refreshing mistake. Therefore, just copy and replace those images that did not load into the project folder, and then hold down Shift Command K (to clear the project). After Clean Up, it should work fine! Enjoy it!

+1
source

If you dragged images from the Finder to the Resources folder in Xcode, the images should also appear in IB. At least this happens in my setup.

The images may be 8-bit PNG images. I believe Cocoa requires them to be 24-bit due to alpha transparency. PNG 8-bit does not support the alpha channel, since it is more like a GIF image.

But from the error you quoted. It seems IB could not find the resource at all. This is understandable if it does not load resources from Xcode into its library.

0
source

Assuming you choose an option that allows Xcode to copy files to your project, and neither Xcode nor Finder complain when you make a copy ... I wonder if there could be a file corruption? Perhaps try to recreate them or open and save them from another graphical application (or even Preview.app).

btw - 8 bit PNGs worked great for me.

0
source

I met the same problem. The problem is the image. The image was somehow distorted. Try opening the image in Photoshop, and you will see that it does not open using Photoshop. I solved the problem by changing the image format to PNG-24 and everything works fine for me. Hope this solves your problem.

Hi,

Rupesh Renon

0
source

All Articles