xcode 9无法加载从带有标识符的包中的笔尖引用的图像 [英] xcode 9 Could not load the image referenced from a nib in the bundle with identifier

查看:38
本文介绍了xcode 9无法加载从带有标识符的包中的笔尖引用的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我昨天移到Xcode 9.0,但是图像资源不起作用.我将图像拖到根目录,然后选择如果需要,请复制"和创建组",然后将其添加到我的项目目标中.

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.

我收到此警告"2017-09-24 11:49:46.578312 + 0330 testResource [3999:148745]无法加载从标识符为" com.app"的捆绑包中的笔尖引用的"past_exam_background.jpg"图像.testResource".我测试了png,结果是相同的.

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.

我该怎么办?

推荐答案

单击Xco​​de中的图片文件.在底部的属性中,您将看到目标成员身份.选中该框,它将起作用.有同样的问题见图片:

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:

这篇关于xcode 9无法加载从带有标识符的包中的笔尖引用的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆