.m 实现这两个方法
#import "CounselorListModel.h"
@implementation CounselorListModel
-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
}
-(id)valueForUndefinedKey:(NSString *)key
{
return nil;
}
//有id 第一种不行 第二种就可以, 是因为我用YYModel吗 还是写错了,先这样吧,以后确定了 再更正
-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
if ([key isEqualToString:@"id"]) {
self.counselorId = [value integerValue];
}
}
+ (NSDictionary *)modelCustomPropertyMapper {
return @{@"counselorId" : @"id"};
}
@end