0
服務器返回顯示JSON對象如下:其約51物體JSON對象的UITableView
[{"location":"Location1","email":"[email protected]","phone":"123456"},{"location":"Location2","email":"[email protected]","phone":"123456789"},
.
.
..
..
..51]
我要分配給此值第一的tableview到位置和使用的DetailView電子郵件和電話號碼...
代碼我用低於:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
[connection release];
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
[responseData release];
NSDictionary *dictionary = [responseString JSONValue];
NSArray *response = [dictionary objectForKey:@"location"];
exercises = [[NSArray alloc] initWithArray:response];
[table reloadData];
}
我在哪裏錯了,請建議...