从NSDictionary中获取数据
2016-05-24 本文已影响44人
Mr_Dragonn
在数据模型中 设置一个方法 传入NSDictionary 中
-(instancetype)initWithDic:(NSDictionary*)dic{
self= [super init];
if(self) {
[self setValuesForKeysWithDictionary:dic];
}
return self;
}
在数据模型中 设置一个方法 传入NSDictionary 中
-(instancetype)initWithDic:(NSDictionary*)dic{
self= [super init];
if(self) {
[self setValuesForKeysWithDictionary:dic];
}
return self;
}