In my Xcode project, i added a bunch of images to use. I need to change out the images so i removed them from the project and deleted them from the folder structure. They should be gone, right?
在我的Xcode项目中,我添加了一堆图像来使用。我需要更改图像,以便将其从项目中删除并从文件夹结构中删除它们。他们应该走了,对吗?
No. when i launch the program, the images are still being used. I did a search on my computer for the file name and only found it in the code
当我启动程序时,图像仍在使用中。我在我的计算机上搜索了文件名,只在代码中找到了它
(i used a constants file and put the file names into strings:
(我使用了常量文件并将文件名放入字符串中:
NSString * const PRESET_LIGHT_GRAY = @"preset-rect-16.png";
NSString * const PRESET_ASH_GRAY = @"preset-rect-17.png";
and this is the only place on my mac that i find the file name).
这是我的mac上唯一找到文件名的地方)。
there is no file on my mac named "preset-rect-16.png" yet Xcode is still using the image.
我的mac上没有名为“preset-rect-16.png”的文件,但Xcode仍在使用该图像。
where is Xcode getting the images? are they stored somewhere else in the project? are they saved in the simulator somewhere?
Xcode在哪里获取图像?它们存放在项目的其他地方吗?他们在某个地方保存在模拟器中吗?
/puzzled
2 个解决方案
#1
3
Go here. Xcode -> Preferences -> Locations -> Derived Data
到这里。 Xcode - >首选项 - >位置 - >派生数据
Wherever your Derived Data Folder is, delete Build for this Project and then run again. Resetting the Simulator is also recommended.
您的派生数据文件夹位于何处,删除此项目的构建,然后再次运行。建议重置模拟器。
#2
0
The images may still be referenced in your target build phases under copy bundle resources. If so delete the references there as well.
仍可在复制包资源下的目标构建阶段中引用这些映像。如果是这样,也删除那里的引用。
#1
3
Go here. Xcode -> Preferences -> Locations -> Derived Data
到这里。 Xcode - >首选项 - >位置 - >派生数据
Wherever your Derived Data Folder is, delete Build for this Project and then run again. Resetting the Simulator is also recommended.
您的派生数据文件夹位于何处,删除此项目的构建,然后再次运行。建议重置模拟器。
#2
0
The images may still be referenced in your target build phases under copy bundle resources. If so delete the references there as well.
仍可在复制包资源下的目标构建阶段中引用这些映像。如果是这样,也删除那里的引用。