I have a UIView
with an UIImageView
dragged onto the view. All of a sudden, for all my xibs, the image no longer shows up. There is a blue X. However, when it builds, the image is there.
At one point, I deleted and regenerated all my images and moved some into a subfolder in Xcode. Normally, when you go to select an image for an UIImageView
, IB allows you to pick from any image in the project. But, I can't see any of the images I had put in the folder anymore in the dropdown.
All I see in the dropdown on the Inspector is the one image I want, but that is also the one that is not showing up. And like I said, if I build it on the device or simulator, it all works.
There is some cache or something screwed up somewhere. Everything builds with no errors. I cleared the caches and rebuilt. It all works. No error or warnings. But...I can't see any other images and IB still thinks it's missing the image that is clearly selected in the dropdown.
So how do I get Xcode and IB back on track and see what assets it properly should be seeing in the XIBs?
The .png was missing from the end of my image name in attributes inspector
After cleaning, re-importing and checking the assets where mapped correctly, nothing worked, though I found my image (which is a png) showed up once I entered .png at the end of the image name in the attributes panel.
My recipé: CLEAN + Build + QUIT XCODE AND THEN REOPEN IT!
Voilá!! It's there!
Just ran into this issue. Exported the identical images in Adobe Illustrator. One as transparent, the other as white. The transparent one showed up with a big blue question mark. Running it, worked fine however. Something to do with IB and transparent PNGs
For me it was because the images had a ".png" in attributes inspector. Removing it fixed the issue
In my case when I have created new project in
Xcode 6
I can not show the images in the Simulator and as well as in device. I have imported all the images in the image assets making a folder within that.Now I have imported all the images, all are working fine now. All images are now showing now.Follow these steps:
STEP 1:
STEP 2:
STEP 3:
and then Import images which you need. Reference Link: StackOverflow link
Make sure you're referencing an image asset that actually exists. I had added my files to the Xcode Asset Catalog (.xcassets) as usual, but forgot to rename from the default name of "Image" to the name I was using in the storyboard.