【发布时间】:2011-09-22 12:37:11
【问题描述】:
我有两个 web 服务 (JSON),一个在 ViewDidLoad 处调用,它返回一个值数组并加载到 Array1 中。我需要通过解析 Array1 的每个值来调用另一个 web 服务。我尝试过这样的事情:
for (pointer=0; pointer<=[Array1 count]; pointer++) {
NSString *test = [Array1 objectAtIndex:pointer];
NSString *urlString2 = [NSString stringWithFormat:@"http://service=%@",test];
NSURLRequest *request2 = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString2]];
connection2 = [[NSURLConnection alloc] initWithRequest:request2 delegate:self];
}
如何调用此函数将输出加载到数组中? 非常感谢您的帮助.. 谢谢
【问题讨论】:
标签: iphone json web-services for-loop nsmutablearray