Images not all showing up on simulator but shows in storyboard

19,052

Solution 1

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 1:

STEP 2:

Step 2

STEP 3:

Step 3

and then Import images which you need. Reference Link: StackOverflow link

Solution 2

I had a similar issue. But later found out that this was because I had put the images in a real folder in the app directory. So there was my project's folder, which contained another folder named 'Assets' which contained the images. This was solved when I moved my images out of the folder and put them in the project's root folder.

Solution 3

In my case the picture was a JPG and not a PNG. Replacing image in xcasset for the same image converted to PNG was the trick.

Solution 4

Restarting simulator fixed my problem. I think it was a cache problem.

NOTE: I'm using iOS 10 with xcode 8

Solution 5

I encountered this problem after I refactored storyboard. The possible solution: - Go to Storyboard and select the image you don't see in the simulator. - Go to the Attributes inspector and re-select the image again.

After Storyboard refactor, sometimes Xcode assigns Unknown image to the UIImageView.

Reselecting the image solved the problem.

Share:
19,052
PressRay
Author by

PressRay

Updated on June 05, 2022

Comments

  • PressRay
    PressRay about 2 years

    I am pretty new to iOS development and I was poking around in storyboard in Xcode 4.5.2. I started a new tab bar project (5 tabs) and then dropped in some images (UIImageViews objects) to them, everything looked good and the build came out fine on the simulator but not all the images are showing up. The same image would be showing on the Firstviewcontroller but it won't show on another viewcontroller. And I can't seem to add new image objects into the firstone (meaning i can place it in the storyboard but new ones won't show up on the simulator), It almost seems to be showing cached screens. For example, I just randomly place images all over a viewcontroller and then shifted them around and ran the simulator again but the positions do not match.

    Does anyone have any information or experience with this on Storyboard?

    Thanks in advance. Ray

  • PressRay
    PressRay over 11 years
    Thanks Douglas for your efforts. It was the auto layout that was placing things all weird. One simple checkbox!
  • Douglas
    Douglas over 11 years
    @PressRay, Glad to help! If you could check the checkmark at the top of the answer, that will accept the answer and it will be considered closed, so others will know. You can also one up by pressing the up arrow. Thanks. Have a great day.
  • Douglas
    Douglas over 11 years
    @PressRay, Think you could accept the answer? Thanks. Glad it worked out.
  • Lukesivi
    Lukesivi over 8 years
    Yup, same exact problem. Thanks.