xcode 9 Could not load the image referenced from a nib in the bundle with identifier

…衆ロ難τιáo~ 提交于 2019-11-28 08:41:20

问题


I moved to Xcode 9.0 yesterday, but image resources don't work. I dragged image to root and select "Copy if needed" and "Create groups" and add to my project targets.

The image is shown in storyboard but it is not shown in Simulator or even device.

I get this warning "2017-09-24 11:49:46.578312+0330 testResource[3999:148745] Could not load the "past_exam_background.jpg" image referenced from a nib in the bundle with identifier "com.app.testResource".I tested png and the result was the same.

what should I do?


回答1:


Click on a picture file in Xcode. in attribute on bottom you'll see Target membership. Check the box and it is gonna work. Had the same problem see picture:



来源:https://stackoverflow.com/questions/46388183/xcode-9-could-not-load-the-image-referenced-from-a-nib-in-the-bundle-with-identi

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