一些系统关键字的变换(服务器传的key名称id 转 模型中的tid),记录下:(本来是放在有道云笔记里面,整理笔记时,拿出来。。。其实没必要放博客的 = =)
1 #import <Foundation/Foundation.h> 2 3 @interface RecentModel : NSObject 4 5 @property (nonatomic, assign) NSUInteger authorid; 6 7 @property (nonatomic, retain) NSString *content; 8 9 @property (nonatomic, assign) NSUInteger tid; 10 11 @end
------------------------------------------
1 #import "RecentModel.h" 2 3 @implementation RecentModel 4 5 + (NSDictionary *)replacedKeyFromPropertyName { 6 7 return @{ 8 9 @"tid":@"id" 10 11 }; 12 13 } 14 15 @end