Storyboard doesn't display assets after migrat

2019-07-19 11:54发布

问题:

After migrating image resources to an Asset Catalog the app builds and runs correctly but the assets don't show up in Xcode's storyboard.

回答1:

In my case this occurred because I used the full asset name including file extension (i.e. '.png') in Storyboard.

However, the name for the asset needs to match the name of the Image Set in the Asset Catalog:

So by removing '.png' from the image name in Storyboard it solved the problem.



回答2:

I've encountered a similar problem that storyboard just not display the images I set in Asset.

But my case is a little bit different. And the answer is pretty simple.

I only drag one image to the image set and accidently put it to "3x" where storyboard would load "1x" from image set.

Hope this would help someone else and save their time. Don't make the silly mistake as I did.