一些系統關鍵字的變換(服務器傳的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