-3

tableViewCell で json コンテンツを解析して表示しようとしていますが、何か問題が発生しています。

JSON はこちら: http://bumpee.net/xcode/index.php

-(void)connectionDidFinishLoading:(NSURLConnection *)connection {
    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:webData options:0 error:nil];

    NSArray *arr = [json objectForKey:@"feed"];
    for(NSDictionary *aaa in arr) {
        NSDictionary *one = [aaa objectForKey:@"1"];
        NSString *onePrint= [one objectForKey:@"name"];
        [array addObject:onePrint];
    }

    [[self tableView ] reloadData];
}
4

1 に答える 1

2

問題は、arr実際にはNSDictionarynot でNSArrayあり、繰り返し処理するときに

for (NSDictionary *aaa in arr) [...]

NSString基本的に、値ではなくキーを通過します。

于 2013-10-06T13:49:56.660 に答える