BaceModel
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;
}
}
BaceModel的更多相关文章
随机推荐
- hdu 确定比赛名次
算法:拓扑排序 题意:有一个比赛,现在知道很多队之间的关系:让你去让确定比赛排名: Problem Description 有N个比赛队(1<=N<=500),编号依次为1,2,3,... ...
- C/C++中的switch使用
代码: #include <iostream> #include <string> #include <cstdio> using namespace std; i ...
- 一个cocos2d-x的项目
前几天完成了一个cocos2d-x的项目,放在git上: https://github.com/gittor/Jigsaw 采用cocos的版本是3.7.1. 项目是一个拼图的游戏,市面上的拼图类游戏 ...
- SpringSource Tools Suite 字体偏小问题
参照了Eclipse小技巧收录http://liuzidong.iteye.com/blog/1320094 发现没有找到相应文件,只有搜索了,一个一个地找,总算找到了,修改方法还是一样,只是路径,文 ...
- Choose the best route--hdu2680
Choose the best route Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Ot ...
- cf B. Vasily the Bear and Fly
http://codeforces.com/contest/336/problem/B #include <cstdio> #include <cstring> #includ ...
- (转载)解决WPF动画属性锁死问题
此文来自: 马开东博客 转载请注明出处 网址:http://www.makaidong.com 一般锁死问题都是出在后台代码写的动画中,以下为转载的解决方案! 方法一:将动画的 FillBehavio ...
- linux系统下svn服务器操作命令
linux系统下svn服务器操作命令 .输出指定文件或URL的内容. svncat 目标[@版本]…如果指定了版本,将从指定的版本开始查找. svncat -r PREV filename > ...
- 【转】notepad++设置字体和字体大小
原文网址:http://www.aichengxu.com/view/604 今天很多朋友问我怎么设置notepad++的代码字体和代码字体的大小,习惯了editplus的朋友可能会在notepad+ ...
- 2013第49周一jsp标签
2013第49周一jsp标签 今天在调试一些前台页面上的问题,在处理structs标签.jstl标签时遇到了些麻烦,为了调用后台数据字典中的类方法,开始在<c:forEach>中尝试怎么样 ...