开发者

How does it compile? How can the compiler find the declaration of NSFetchedResultsController, when there is no obvious import statemetn?

I make my first steps in objective-c and cocoa. I typed in the following example class, which compiles well in the iPhone main project. When I use the sample class in an OCUnitTest, the compiler raise an error.

class:

#import <UIKit/UIKit.h>

@interface ProjekteTableVie开发者_开发问答wController : UITableViewController {
    NSFetchedResultsController *fetchedResultsController;    
}

@property (nonatomic, retain) NSFetchedResultsController *fetchedResultsController;

@end

Now the question: I see in UIKit.h no direct or indirect #import for the NSFetchedResultsController.h file.

How does the compiler resolve this identifier (NSFetchedResultsController) ?

I expected the compiler error not only in the UnitTest project, but also in the main project.


I suspect you've got a prefix header that's including CoreData.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜