Storyboard doesn't display assets after migrating to Asset Catalog

本秂侑毒 提交于 2019-12-10 22:22:42

问题


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.



来源:https://stackoverflow.com/questions/19006001/storyboard-doesnt-display-assets-after-migrating-to-asset-catalog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!