forked from bestswifter/MySampleCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKtMainTableItem.m
More file actions
36 lines (29 loc) · 765 Bytes
/
KtMainTableItem.m
File metadata and controls
36 lines (29 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// KtMainTableItem.m
// KtTableView
//
// Created by baidu on 16/5/13.
// Copyright © 2016年 zxy. All rights reserved.
//
#import "KtMainTableItem.h"
@implementation KtMainTableItem
- (id)init {
self = [super init];
if (self) {
[self addMappingRuleProperty:@"books" pathInJson:@"data"];
[self addMappingRuleArrayProperty:@"books" class:[KtMainTableBookItem class]];
}
return self;
}
@end
@implementation KtMainTableBookItem
- (id)init {
self = [super init];
if (self) {
[self addMappingRuleProperty:@"bookTitle" pathInJson:@"title"];
[self addMappingRuleProperty:@"url" pathInJson:@"url"];
[self addMappingRuleProperty:@"imageUrl" pathInJson:@"imageUrl"];
}
return self;
}
@end