(instancetype)initFromDictionary:(NSDictionary *)dictionary
{ShowLog
self = [super init];
if (self) {
_cid = StringValue(dictionary, KID);
_user = [[User alloc] initFromDictionary:DictionaryValue(dictionary, Kuser)];
_images = ArrayValue(dictionary, Kimages);
_content = StringValue(dictionary, Kcontent);
//_beCommented= [[Comment alloc] initFromDictionary:DictionaryValue(dictionary, KbeCommented)];
_createTime = DateValue(dictionary, KcreateTime);
_ownerId = StringValue(dictionary, KownerId);
}
return self;
}
注释那个行使程序进入了死循环,这个要怎么改?
属性用getter方法初始化加载也很方便,一个方法里面又要调用自己,需要有一个结束条件。