CoreData生成的访问器定义

时间:2011-10-05 12:08:12

标签: objective-c cocoa

我需要在超类中使用这些访问器移动方法:

@interface CBComic (CoreDataGeneratedAccessors)

- (void)addCharactersObject:(CBCharacter *)value;
- (void)removeCharactersObject:(CBCharacter *)value;
- (void)addCharacters:(NSSet *)value;
- (void)removeCharacters:(NSSet *)value;

我已经将方法声明粘贴到我的超类,但是我得到一个警告,即超类中没有提供定义。

实施由Core Data提供,那么我该如何解决呢? 感谢

1 个答案:

答案 0 :(得分:0)

@interface YourSuperClass : NSManagedObject

...

@end

@interface YourSuperClass (CoreDataGeneratedAccessors)

- (void)addCharactersObject:(CBCharacter *)value;
- (void)removeCharactersObject:(CBCharacter *)value;
- (void)addCharacters:(NSSet *)value;
- (void)removeCharacters:(NSSet *)value;

@end