Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

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

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?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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: enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...