// 下面两个方法。都属于 KVC 的方法
// KVC 是 cocoa 的大招。间接给对象属性设置数值
// 程序运行过程中,动态给对象属性设置数值。不关心 .h 中是怎样定义的
// 仅仅要对象有属性(不管是在.h中还是在.m中定义的属性),就行读取/设置!
// 这样的方式,有点违背程序的开发原则。
// 字典转模型 setValuesForKeysWithDictionary
// 模型转字典 dictionaryWithValuesForKeys
//如果self.person 是定义的一个person对象,
//person对象的属性有name,age,height。私有属性有weight
//那么对象转字典例如以下:
NSDictionary *dict = [self.person dictionaryWithValuesForKeys:@[@"name", @"age", @"weight", @"height"]];//參数数组是属性的名称
//字典转模型例如以下
[self.person setValuesForKeysWithDictionary:dict];