#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface Employee : NSManagedObject
@property (nonatomic, retain) NSString* name;
@property (nonatomic, retain) NSNumber* pin;
-(id) initWithName:(NSString*)name Pin:(NSNumber*)pin;
@end
@implementation Employee
@dynamic name;
@dynamic pin;
-(id) initWithName:(NSString*)iname Pin:(NSNumber*)ipin{
self = [super init];
if(self){
name = iname;
pin = ipin;
}
return self;
}
@end
编译器说 .m 文件中未声明名称和引脚。我究竟做错了什么?投入self.name
和self.pin
工作,但有人可以告诉这是否正确或为什么这样工作?等提前感谢您的帮助。