从cocoa项目中删除了ViewController.h和viewController.m

时间:2012-09-03 23:38:20

标签: cocoa uiviewcontroller

我移动到垃圾选项,现在其他files.h无法导入viewcontroller.h。我如何将其恢复到我的项目中?

1 个答案:

答案 0 :(得分:0)

使用finder,将它们从垃圾箱中移出,然后使用其余的源文件返回到项目目录,然后在xCo​​de中,Right-Click(或者在触摸板上点击两次触摸)在组中选择'Add Files to <Project Name>'

找到源目录中的文件(应该很简单,对话框将灰色显示项目中已有的文件)并选中copy files into destination's group folder (if needed)

确保在Add to targets框中突出显示您的目标(不是测试目标,只显示主要目标),然后点击Add按钮