一些系统关键字的变换(服务器传的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

 

相关文章:

  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-06-18
  • 2021-06-21
猜你喜欢
  • 2022-12-23
  • 2022-03-04
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案