找不到头文件 [英] headerfile not found
问题描述
我正在开发iphone应用程序,一切都很顺利,直到我尝试导入NSFetchedResultsController.h。当我打字时,这个Xcode为我完成了。但现在它给出了错误:找不到NSFetchedResultsController.h文件。
I am working on a iphone app and everything went fine untill I tried to import NSFetchedResultsController.h. when I was typing this Xcode completed it for me. But now it gives the error: NSFetchedResultsController.h file not found.
我把它包括在内:
#import "NSFetchedResultsController.h"
我看了一遍互联网的答案,但没有任何作用。 (还有一些东西需要Xcode 4.3才能工作)。
I looked all over the internet for the answer to this, but nothing works. (and a few things need Xcode 4.3 to work).
我在Snow Leopard上使用Xcode 4.2。
I am using Xcode 4.2 on Snow Leopard.
推荐答案
实际上,在大多数情况下,您确实不需要手动导入标题。
只需添加Coredata.framework即可构建如下阶段:
In fact you really don't need to import the header manually in most cases. just add Coredata.framework to build phases as below:
现在在项目导航器中查看左侧,您会看到CoreData.framework已添加。打开Header文件夹,只需找到NSFetchedResultsController.h即可。
为了测试它的存在,你可以输入:
Now look at left in project navigator, you see CoreData.framework added. open Header folder and simply you can find NSFetchedResultsController.h. For testing its existence, you can type:
CoreData / NSFet
CoreData/NSFet
瞧,代码建议告诉你你想要什么。请看下图:
and voila, code suggestion tells you what you wanted . look at the picture below:
重要提示:此功能仅适用于iOS 3或更高版本
IMPORTANT: this is available only for iOS 3 or higher
这篇关于找不到头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!