Reputation: 1423
the second image view's image is taken from asset library as you can see it is not referencing images from assets library but taking from the image file included in the project
Upvotes: 7
Views: 9332
Reputation: 2355
You have to do three steps:
Open Xcode. Go to window and choose projects. From new menu choose delete derived data.
Remove image from assets library. Set it again and link it to image view.
Click cmd+shift+k
to clean your project. After that run your app or put it in preview seen.
Upvotes: 8
Reputation: 4870
There's a similar problem when trying to access images within your assets directly by name as seen below:
The image does not appear when you change the name of the image after adding it to a folder within assets.
To fix this follow Ahmed's answer.
To prevent this from happening name your images prior to placing them in folders or add them to assets without a folder.
Upvotes: 0
Reputation: 2616
For others experiencing this or similar issue; The reason this happened to me was that I only supplied the @3x
version of the image in the asset folder. When I supplied @1x
and @2x
the images was shown as expected in the storyboard again.
This started happening when Xcode forced me to choose device in the storyboard.
Upvotes: 0
Reputation: 937
Try to check "target membership" of Assets.xcassets file.
Upvotes: 7