0

iphone sdk のデータベースに保存されている urllink データを取得するには?

4

1 に答える 1

2

次のコードを使用すると役立つ場合があります。

    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"Your URL"]]];

    // Perform request and get JSON as a NSData object

    NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];

NSLog(@"Your Data=%@",response);

    id jsonObject = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingAllowFragments error:nil];
于 2012-12-08T08:12:14.347 に答える