https://github.com/nicklockwood/BaseModel

字典封装成model 自动封装

要求属性的名字与字典一样

不能有对象

如果其中有需要自己封装的对象属性

重写setWithDictionary

-(void)setWithDictionary:(NSDictionary *)dict{

[super setWithDictionary:dict];

//user

self.WBuser = [WeiboUser userWithDictionary:[dict objectForKey:@"user"]];

//retweetWeibo

if ([dict objectForKey:@"retweeted_status"] != nil) {

WeiboModel *retModel = [[WeiboModel alloc] init];

[retModel setWithDictionary:[dict objectForKey:@"retweeted_status"]];

self.retweetedWeiboModel = retModel;

}

}

最新文章

  1. seajs和requirejs
  2. AngularJS API之bootstrap启动
  3. Maven多模块项目使用MyBatis Generator
  4. 使用正则表达式获取Sql查询语句各项(表名、字段、条件、排序)
  5. POJ_1287_mst
  6. 用happen-before规则重新审视DCL(转)
  7. /storage/sdcard, /sdcard, /mnt/sdcard 三者的区别
  8. cloudstack安装篇2-主机名配置
  9. NHibernate -- HQL
  10. Lync Server 2013中央管理存储:自动收集配置数据失败
  11. Java 并发 中断线程
  12. SQL 收缩数据库日志的几种办法 (2005与2008 略有区别)
  13. 【游戏开发】基于VS2017的OpenGL开发环境搭建
  14. jsonp和CORS跨域实现
  15. poj3696 欧拉函数引用
  16. HTML5表单新属性
  17. jenkins 添加 k8s 云
  18. 小程序笔记三:幻灯片swiper 和图片自定义高度
  19. console access jquery--------json
  20. MySQL版本详解

热门文章

  1. Qt将表格table保存为excel(odbc方式)
  2. JDK+Eclipse+MyEclipse+tomcat的安装与配置
  3. mysql update语句,修改字段,,或者是批量修改字段
  4. 三个重要的游标sp_cursoropen
  5. hibernate集合映射inverse和cascade详解
  6. Yoga安装Ubuntu后,wifi和亮度调节问题
  7. [Google Code Jam (Qualification Round 2014) ] A. Magic Trick
  8. poj3261 -- Milk Patterns
  9. windows下编译firefox
  10. 【转】UltraISO制作U盘启动盘安装Win7/9/10系统攻略