Instagram から JSON フィードを取得して、UITableView にデータを表示しようとしています。ただし、次のエラーが発生し、問題が何であるかを理解できません。
2013-08-18 10:20:37.361 ttoauth[38213:c07] -[__NSCFDictionary objectAtIndex:]: インスタンス 0x75d7480 に送信された認識されないセレクター
2013-08-18 10:20:37.362 ttoauth[38213:c07] *** 終了アプリdue to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x75d7480'
*** First throw call stack: (0x13c8012 0x11ede7e 0x14534bd 0x13b7bbc 0x13b794e 0x3f68 0x1ec8fb 0x1ec9cf 0x1d51bb 0x1e5b4b 0x1822dd 0x12016b0 0x26abfc0 0x26a033c 0x26a0150 0x261e0bc libc++abi.dylib: libc++abi.dylib: 例外をスローして呼び出された終了
これが私のコードです:
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return [jsonResults count];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
CustomCell *cell = (CustomCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
NSDictionary *instafeed_tableview = [jsonResults objectAtIndex:indexPath.row];
NSString *username_label = [[instafeed_tableview objectForKey:@"from"] valueForKey:@"username"];
cell.username.text = [NSString stringWithFormat:@"%@", username_label];
cell.username.clipsToBounds = YES;
cell.contentView.clipsToBounds = NO;
return cell;
}
-(NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
-(CGFloat)tableView :(UITableView *)tableView heightForRowAtIndexPath :(NSIndexPath *)indexPath {
return 191;
}
私は何を間違っていますか?