RestKit を使用して API からのデータを操作しています。
ビジネスのリストを取得したいのですが、正しく返されています。それでも、そのリストを取得したら、結果をUITableView
.
応答例:
"venue": [{
"name": "X Business", {
API 応答の前にこれらの結果を削除する方法はありません。API 応答を取得したら結果を表示する前にこれを行う方法はありますUITableView
か?
編集:
ビューコントローラー
@property (strong, nonatomic) NSArray *springs;
@property (strong, nonatomic) NSMutableArray *leafs;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"standardCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
Spring *spring = [springs objectAtIndex:indexPath.section]; // 13 objects
Leaf *leaf = [spring.leafs objectAtIndex:indexPath.row]; // 30 objects
cell.textLabel.text = leaf.shortName;
return cell;
}
EDIT 2: Response.m はモデルです
@implementation Response
+ (RKObjectMapping *)mapping {
RKObjectMapping *objectMapping = [RKObjectMapping mappingForClass:[self class] usingBlock:^(RKObjectMapping *mapping) {
[mapping mapKeyPathsToAttributes:
@"premium", @"premium",
nil];
}];
return objectMapping;
}
@end